1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Recursive Definition

  1. Oct 21, 2013 #1
    1. The problem statement, all variables and given/known data
    Give a recursive definition for the set
    of bit strings [itex]\{ 0^{r} 1^{s} 0^{r} \| r, s \in N \}[/itex]. Note the number of 0’s must be equal, but the
    number of 1’s may be different from the number of 0’s.

    2. Relevant equations

    3. The attempt at a solution
    I believe this is:
    Basis: [itex]\lambda \in A[/itex]
    Recursive Step: If [itex]\omega \in A[/itex], then [itex]0 \omega 1 \omega 0 \in A[/itex]

    I just want to verify if this is correct or not.

  2. jcsd
  3. Oct 21, 2013 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    If [itex] \omega = 010 [/itex] then you just claimed that 001010100 is in A.
  4. Oct 22, 2013 #3
    Ohh, I think I see. [itex]w[/itex] represents the initial value, which would basically make everything I put wrong. What about the following:

    Basis: [itex]0 1^{n} 0 \in A , n \in N[/itex]
    Recursive Step: if [itex]w \in A[/itex], then [itex]0 w 0 \in A[/itex]

    Because, this would give: [itex]A = \{ 010, 00100, 001100, ... \}[/itex]
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted