Let a string built from the characters ”0”, “1”, and “2”, and 0 be called balanced if it contains an equal number of 1s

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899559
Joined: Mon Aug 02, 2021 8:13 am

Let a string built from the characters ”0”, “1”, and “2”, and 0 be called balanced if it contains an equal number of 1s

Post by answerhappygod »

Let a string built from the characters ”0”, “1”, and “2”, and 0
be called balanced if it contains an equal number of 1s and 2s. For
instance, there are 19 balanced sequences of length 4: 0000,0012,
0021, 0102, 0120, 0201, 0210, 1002, 1020, 1122, 1200, 1212, 1221,
2001, 2010, 2100, 2112,2121, and 2211 (note: these are written here
in strictly ascending order, which may or may not be a comfortable
way to find them using a brute force approach).
(a) Count(either by brute force, or by using another technique
if you have a notion of a good approach) the balanced strings of
length 0, 1, 2, and 3. (Note that 0 is a conceptually somewhat
difficult case).
b) Using the data from the example and part (a), identify a
sequence in the Online Encyclopedia of Integer Sequences that seems
to count the balanced strings of length n. The data produced thus
far will not uniquely identify a single OEIS sequence, so
confirming the correct one is a matter either of interpreting the
sequence descriptions or of somehow using the knowledge you already
have to rapidly determine the number of length-5 sequences.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply