C A B B A G E CABBAGE

Consider all 7-letter words containing only the letters { A , B , C , E , G } \big\{A,B,C,E,G\big\} . Arranging these words in alphabetical order, we get: A A A A A A A , A A A A A A B , A A A A A A C , . . . , G G G G G G E , G G G G G G G AAAAAAA, AAAAAAB, AAAAAAC, ..., GGGGGGE, GGGGGGG . What is the position of the word C A B B A G E CABBAGE ?


The answer is 32024.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

I will show a simple method to solve problems like this one. I know that it is a combinatorics problem but we can use the principle of numerical bases to solve it.

Let's attribute a number to each alphabet of the set:

A = 0 A=0

B = 1 B=1

C = 2 C=2

E = 3 E=3

G = 4 G=4

Now we can convert the "words list" to a numerical list:

A A A A A A A = 0000000 AAAAAAA=0000000

A A A A A A B = 0000001 AAAAAAB=0000001

A A A A A A C = 0000002 AAAAAAC=0000002

A A A A A A E = 0000003 AAAAAAE=0000003

. . . ...

C A B B A G E = 2011043 CABBAGE=2011043

Notice that these numbers are in base 5 . Now we can convert CABBAGE to decimal:

2 5 6 + 0 5 5 + 1 5 4 + 1 5 3 + 0 5 2 + 4 5 1 + 3 5 0 = 31250 + 625 + 125 + 20 + 3 = 32023 2\cdot5^6+0\cdot5^5+1\cdot5^4+1\cdot5^3+0\cdot5^2+4\cdot5^1+3\cdot5^0=31250+625+125+20+3=32023

In this list AAAAAAA is in the "0th" position because it corresponds to the number 0. But it is in actually the 1st. So, CABBAGE is in the 32023 + 1 = 32024 t h 32023+1=32024th position in this list.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...