### artificial intelligence

1) Suppose you are searching for a girlâ€™s name written using only the three letters L, O and A.
1a) How many strings of four or fewer letters are there? (1)
1b) In the above possibilities, are you searching in a depth first or breadth first way? (1)
1c) What are the next three possible names you would write down starting with LO? (2)
1d) How many possibilities will you write down before getting to the name LOLA, show it by
implementation? (5)
1e) Are you guaranteed to find all girls names with letters L, O and A in this manner? (1)
I suggest you read this: http://cplusplus.com/forum/beginner/1/

And then show us what you've done so far.
if u think u are a good programmer enough to solve this problem then solve and prove urself ,
jpt,
closed account (zb0S216C)
jpt wrote:
if u think u are a good programmer enough to solve this problem then solve and prove urself (sic)

OK. I'll just fire-up my IDE and I'll write the code for you.

[Note: It's been over 1 hour and 5 minutes since my post, and if you haven't figured it out yet, I was being sarcastic; I'm not going to write the code.]

Wazzak
Last edited on
 1a) How many strings of four or fewer letters are there? (1)

0 letters -> 260 = 1
1 letter -> 261 = 26
2 letters -> 262 = 676
3 letters -> 263 = 17576
4 letters -> 264 = 456976

Therefore, there are 474579 strings with four or fewer letters.

 1b) In the above possibilities, are you searching in a depth first or breadth first way? (1)

 1c) What are the next three possible names you would write down starting with LO? (2)

1. Loach
2. Loaches