Question: A . [ 6 points 3 , 3 ] Skolar + + . Nadha ' s older brother, Bedha Skolar has just finished designing a

A.[6 points 3,3] Skolar++.Nadha's older brother, Bedha Skolar has just finished designing a new programming language aptly named "Skolar++." The syntax of Skolar++ requires all variable names to adhere to certain restrictions. Based on these restrictions, Bedha is now determining how many different variable names are possible. All variables must be named according to the following conventions:
Zero or more letters from the set {b, e, d}
followed by
Zero or more digits from the set {0,1,2,3}.
In other words, the empty string, b,12, bed100, and bedb2012 are all legal variable names. However, 1b and be2d are not valid variable names in Skolar++. Following this logic, we can see:
There is exactly 1 legal variable name of length 0, the empty string.
There are exactly 7 legal variable names of length 1: b, e, d,0,1,2, and 3.
There are exactly 37 legal variable names of length 2: bb, be, bd, b0, b1, b2, b3, eb, ee, ed, e0, e1, e2, e3, db, de, dd, d0, d1, d2, d3,00,01,02,03,10,11,12,13,20,21,22,23,30,31,32, and 33.
(i)[3 points] By illustrating the formula, indicate how you would determine the the number of possible legal variables names of length n.
(ii)[3 points] Now, using your formula, find a closed-form expression for the number of possible variable names of length n in the Skolar++ language.

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!