Question: Consider a string consisting of a ' s , b ' s , and c ' s , where the number of b ' s

Consider a string consisting of a's,b's, and c' s, where the number of b' s is three times the number of a' s and the number of c' s is
five times the number of a' s. Prove that the length of the string is divisible by 3.
Proof: Suppose s is a string of length n that consists of a's,b's, and c's, where the number of b's is
times the
number of a's, and the number of c's is
times the number of a's.
Let x,y and z be the numbers of a's,b's, and c's in s, respectively.
The length of s is the --- Select---vv of the numbers of a's,b's and c's that are in s. Hence,
Because x is an integer, so is (,)x, and thus n equals 3*(an integer).
Hence, by definition of divisibility, n is divisible by 3.
Consider a string consisting of a ' s , b ' s ,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!