MHB Can You Define the Recursive Equation for Strings of 1s and 2s with 3 Mod 4 1s?

  • Thread starter Thread starter Amad27
  • Start date Start date
  • Tags Tags
    String
Click For Summary
The discussion focuses on defining a recursive equation for the set K of strings composed of 1s and 2s, where the count of 1s is congruent to 3 modulo 4. The initial hints suggest that K includes the empty string, strings with no 1s, and those with 1s that meet the specified condition. Examples provided indicate that strings can start with 1 and contain exactly three 1s, while also allowing for the inclusion of any number of 2s. The recursive structure is explored, emphasizing that if a string s is in K, then adding 2 or specific patterns of 1s maintains membership in K. The conversation aims to clarify the recursive definition while addressing challenges in ensuring the count of 1s meets the modulo condition.
Amad27
Messages
409
Reaction score
1
If $K$ is the set of strings of 1s and 2s with the number of 1s $\equiv3\bmod4$ and with any amount of $2$s, find a recursive definition of $K$. For example, $1112112121$.

I'm in need of some hints.

The string can be empty, have no 1's or have 1's equivalent to 3 mod 4.
$$K=\{\varepsilon,2\}\cup\{2,111,x\}K$$
I'm unable to figure out how to have the number of 1s exactly $\equiv3\bmod4$.
 
Physics news on Phys.org
Hi Olok,

The strings of the form 12*12*12* are in K, aren't they?
That is, the strings that begin with 1 and that have exactly three 1's.

If s is in K, then 2s is also in K.

If s is in K, then 12*12*12*1s is also in K.
That is, we can add a string with exactly four 1's.
 
There is a nice little variation of the problem. The host says, after you have chosen the door, that you can change your guess, but to sweeten the deal, he says you can choose the two other doors, if you wish. This proposition is a no brainer, however before you are quick enough to accept it, the host opens one of the two doors and it is empty. In this version you really want to change your pick, but at the same time ask yourself is the host impartial and does that change anything. The host...

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 75 ·
3
Replies
75
Views
6K
Replies
4
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K