- #1

- 4

- 0

Hello,

This is a simple question, but I don't remember how to do it. I am working with a computer program someone else wrote to generate some strings of numbers, and I need to know the syntax for describing the pattern of these numbers. I have determined the characteristics of all the possible numbers the program could generate (it's not complicated), but I need help translating it into mathematical language. So here goes.

The program only generates 1s and 0s, and concatenates them into one large string.

A string of length two can be generated, but it must be "11."

Strings of length one, three, four, or five are impossible.

Strings of length six must have a sequence of four consecutive 1s in the second through fifth positions, i.e., ?1111? (the question marks can be either zero or one).

Strings can be greater than length six, but there must always be this same ?1111? placed somewhere in the string, so ???1111? is allowed, ?1111???????????? is allowed, ?1111?? is allowed, and so on. As long as ?1111? appears somewhere in the string, it is legal.

Can someone please explain how I can describe this mathematically?

Thanks in advance for any help.

This is a simple question, but I don't remember how to do it. I am working with a computer program someone else wrote to generate some strings of numbers, and I need to know the syntax for describing the pattern of these numbers. I have determined the characteristics of all the possible numbers the program could generate (it's not complicated), but I need help translating it into mathematical language. So here goes.

The program only generates 1s and 0s, and concatenates them into one large string.

A string of length two can be generated, but it must be "11."

Strings of length one, three, four, or five are impossible.

Strings of length six must have a sequence of four consecutive 1s in the second through fifth positions, i.e., ?1111? (the question marks can be either zero or one).

Strings can be greater than length six, but there must always be this same ?1111? placed somewhere in the string, so ???1111? is allowed, ?1111???????????? is allowed, ?1111?? is allowed, and so on. As long as ?1111? appears somewhere in the string, it is legal.

Can someone please explain how I can describe this mathematically?

Thanks in advance for any help.

Last edited: