Bit Strings: Recursive Definition

  • Thread starter Thread starter sta|ker
  • Start date Start date
  • Tags Tags
    Definition
sta|ker
Messages
12
Reaction score
0

Homework Statement


Give a recursive definition for the set
of bit strings \{ 0^{r} 1^{s} 0^{r} \| r, s \in N \}. Note the number of 0’s must be equal, but the
number of 1’s may be different from the number of 0’s.

Homework Equations


N/A

The Attempt at a Solution


I believe this is:
Basis: \lambda \in A
Recursive Step: If \omega \in A, then 0 \omega 1 \omega 0 \in A

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

Thanks!
 
Physics news on Phys.org
If \omega = 010 then you just claimed that 001010100 is in A.
 
Office_Shredder said:
If \omega = 010 then you just claimed that 001010100 is in A.

Ohh, I think I see. w represents the initial value, which would basically make everything I put wrong. What about the following:

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

Because, this would give: A = \{ 010, 00100, 001100, ... \}
 
Thread 'Use greedy vertex coloring algorithm to prove the upper bound of χ'
Hi! I am struggling with the exercise I mentioned under "Homework statement". The exercise is about a specific "greedy vertex coloring algorithm". One definition (which matches what my book uses) can be found here: https://people.cs.uchicago.edu/~laci/HANDOUTS/greedycoloring.pdf Here is also a screenshot of the relevant parts of the linked PDF, i.e. the def. of the algorithm: Sadly I don't have much to show as far as a solution attempt goes, as I am stuck on how to proceed. I thought...
Back
Top