Can Structural Induction Prove Bit String Relationships?

In summary, the forum user presented their attempt at a proof for the statement "in a bit string, the string 01 occurs at most one more time than the string 10." They used structural induction and divided their proof into a basis step and a recursive step. However, they could improve their proof by addressing all four possibilities for the addition of a bit x to the string w, and by providing a more formal explanation for why the number of 10's and 01's will always be equal when w ends in 0. Overall, their reasoning appears to be consistent and valid.
  • #1
pc2-brazil
205
3

Homework Statement


Prove that in a bit string, the string 01 occurs at most one more time than the string 10.

2. The attempt at a solution

I wish to use structural induction for this proof.
Let [itex]\Sigma^*[/itex] be the set of all strings over the alphabet [itex]\Sigma={0,1}[/itex].
Let P(w) be the proposition "in the bit string w, the string 01 occurs at most one more time than the string 10".
Basis step: [itex]P(\lambda)[/itex], where [itex]\lambda[/itex] is the empty string, is true, because there are 0 strings 01 and 0 strings 10.
Recursive step: Here, I have to show that, if P(w) is true for some arbitrary [itex]w\in\Sigma^*[/itex], then P(wx) is true, where [itex]x\in\Sigma[/itex]. In other words, wx (the bit string w with one more bit x added to it) also has at most one 01 more than 10.
Suppose that P(w) is true. Then, in the bit string w, the string 01 occurs at most one more time than the string 10.
The bit string w can only end in 0 or in 1. When the bit x (which can be 0 or 1) is added, four possibilities occur:
1) w ends in 1 and x ends in 0. In this case, P(wx) is true, because wx has no extra 01's.
2) w ends in 0 and x ends in 0. In this case, P(wx) is also true.
3) w ends in 1 and x ends in 1. In this case, P(wx) is also true.
4) w ends in 0 and x ends in 1.
We have a problem in the last case, because there is one "01" added. By the inductive hypothesis, if w has at most one extra 01, then the proof would fail.
To complete the proof, I have to show that, if w ends in 0, it cannot have more 01's than 10's.
Here is an informal attempt. I will try to build w adding bits to it, and show that, if it ends with 0, for every 01 there will be a 10:
Suppose w is initially one or more 0's. If I add one or more 1's, then there would be one 01. If I add one 0, there will be one 10 to balance with that 01. If I keep adding 0's, the situation won't change. The only way to add one extra 01 would be to add one or more 1's. If I add one or more 0's to the end, one more 10 will be added and the number of 10's and 01's will be equal again.
By the above reasoning, if w ends in 0 and begins in 0, the number of 10's will always equal the number of 01's.
If w begins in one or more 1's, I can add 0 and apply the same reasoning as above, only that there will be one extra 10.
Is this reasoning consistent? How can I show this formally?

Thank you in advance.
 
Physics news on Phys.org
  • #2




Thank you for presenting your attempt at a solution to this problem. Your use of structural induction is a good approach for proving this statement. However, there are a few points that could be clarified or expanded upon in your proof.

Firstly, in your recursive step, you mention that there are four possibilities for the addition of the bit x to the bit string w. However, you only address three of those possibilities in your reasoning. The fourth case, where w ends in 0 and x ends in 1, is the one that could potentially cause an issue with the inductive hypothesis. It would be helpful to explain why this case does not affect the validity of the statement.

Additionally, your reasoning for why the number of 10's and 01's will always be equal when w ends in 0 could be expanded upon. It would be helpful to provide a more formal explanation or proof for this assertion, as it is a crucial step in your overall proof.

Overall, your reasoning appears to be valid and consistent. However, in order to fully convince readers of your proof, it would be helpful to provide more detail and explanation in certain areas. I hope this feedback is helpful to you in refining your proof. Keep up the good work!
 

Related to Can Structural Induction Prove Bit String Relationships?

1. What is a bit string?

A bit string is a sequence of bits, which are binary digits represented by either a 0 or a 1. It is used to store and transmit data in computer systems.

2. Why is proof concerning bit strings important?

Proof concerning bit strings is important because it helps to ensure the accuracy and reliability of data in computer systems. It allows for the verification of data and helps to detect and correct errors.

3. How is proof concerning bit strings conducted?

Proof concerning bit strings is conducted using mathematical techniques, such as logic and algebra, to verify the correctness of data. It involves checking the consistency and completeness of the data to ensure its accuracy.

4. What are some common applications of bit strings?

Bit strings are used in a variety of applications, including data compression, error detection and correction, encryption, and digital signatures. They are also used in computer programming for tasks such as bitwise operations and data representation.

5. What are the limitations of bit strings?

One limitation of bit strings is that they can only represent binary data, which means they are not suitable for storing and processing non-numeric data, such as text or images. Additionally, the length of a bit string is limited by the storage capacity of the system, which can restrict the amount of data that can be represented.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
686
  • Calculus and Beyond Homework Help
Replies
2
Views
861
  • Calculus and Beyond Homework Help
Replies
0
Views
478
  • Calculus and Beyond Homework Help
Replies
1
Views
678
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
934
  • Calculus and Beyond Homework Help
Replies
7
Views
752
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
547
Back
Top