Skip to main content

Cyclicity of Numbers

Important Concepts and Shortcuts of Cyclicity of Numbers

Types of questions based on cyclicity of numbers
There are mainly 3 categories of questions which fall under cyclicity of numbers, that include
  1. How to find units digit of ab
  2. How to find units digit of ab * cd * ef
  3. How to find units digit of abc
Let's see how to solve these questions using the concept of cyclicity of numbers, with examples.

Find units digit of ab

Given ab, units place digit of the result depends on units place digit of a and the divisibility of power b.
Consider powers of 2
As we know,
21 =2
22 = 4
23 = 8
24 = 16
25 = 32
26 = 64
27 = 128.. and so on
What do you observe here? We can see that the units place digit for powers of 2 repeat in an order: 2, 4, 8, 6. So the "cyclicity" of number 2 is 4 (that means the pattern repeats after 4 occurrences) and the cycle pattern is 2, 4, 8, 6. From this you can see that to find the units place digit of powers of 2, you have to divide the exponent by 4.

Let's check the validity of above formula with an example.

Example
  • Find the units place digit of 299?
Using the above observation of cyclicity of powers of 2, divide the exponent by 4. 99/4 gives reminder as 3. That means, units place digit of 299 is the 3rd item in the cycle which is 8.

Shortcuts to solve problems related to units place digit of ab
  • Case 1: If b is a multiple of 4
    • If a is an even number, ie: 2, 4, 6 or 8 then the units place digit is 6
    • If a is an odd number, ie: 1, 3, 7 or 9 then the units place digit is 1
  • Case 2: If b is not a multiple of 4
    • Let r be the reminder when b is divided by 4, then units place of ab will be equal to units place ofar
Let's call it the general rule of cyclicity. Using these rules you can solve all the problems related to cyclicity of numbers.

Here we have captured the cyclicity of numbers upto 9 in the below table.
Number^1^2^3^4Cyclicity
224864
339714
446462
555551
666661
779314
884264
991912

Find units digit for numbers of the form ab * cd

Question of this type is similar to first category.
  • First find the unit digit of ab and cd separately. Let the answers be x and y
  • Then unit digit of ab * cd = units digit of x * y

Find units digit of abc

Questions of this type have to be approached on a case by case basis.
  • Case 1: If cyclicity of units place digit of a is 4 then we have to divide the exponent of a by 4 and find out the remainder. Depending on the value of remainder we can apply the general rule of cyclicity given above and reach the solution.
  • Case 2: If cyclicity of units place digit of a is 2, only extra information we need to find is if the exponent will be even or odd. Then we can apply the general rule of cyclicity given above and reach the solution.
Let's see application of these rules with help of examples

Example 1:
  • Find the units place digit of 24344
  1. Here cyclicity of units place digit is 4 (Units place digit is 2, from the above table we can see the cyclicity of 2 is 4). Hence case 1 is applicable.
  2. Now we have to find the remainder when exponent of 2 is divided by 4, that is the remainder when 4344 is divided by 4.
  3. Remainder of 4344/4 = Remainder of (44 – 1)44/4
  4. Using the binomial theorem, (as explained in number system tutorial) we can see that there is only one term in the expansion of (44 – 1)44 which is not divisible by 4.
  5. The term is 144/4
  6. Remainder of 144/4 = 1
  7. Now we can apply the general rules of cyclicity, (since reminder is 1, case 2 of general rule of cyclicity is applicable) which says, units place of 24344 = units place of 21 = 2.
Example 2:
  • Find the units place digit of 293945
  1. Here cyclicity of units place digit of a, that is cyclicity of 9 is 2. Hence case 2 is applicable
  2. Next step is we need to find if 3945 is even or odd 
  3. 3945 will always result in an odd number, because we are multiplying an odd number 39, odd number of times (45).
  4. Now we can apply the general rule of cyclicity described in the first section. General rule says, first check if exponent is divisible by 4. Since the exponent here is odd, it's not divisible by 4.
  5. Again according to general rule, if exponent is not divisible by 4, find the reminder when exponent is divided by 4.
  6. Since the exponent is odd here, the possible reminders when it's divided by 4 are 1 and 3.
  7. This means, the units place digit of number will be 1st or 3rd element in the cyclicity of units place digit of a.
In this case 1st and 3rd elements of 9 (units place digit of 29) is 9.
Hence units place digit of 2293945 is 9.

Comments

Popular posts from this blog

ORACLE 9i practice solutions

Created by BCL easyConverter SDK 3 (HTML Version)

Zoho Puzzle Questions With Answers

Measuring Time Logic Puzzle You are given with two ropes with variable width. However if we start burning both the ropes, they will burn at exactly same time i.e. an hour. The ropes are non-homogeneous in nature. You are asked to measure 45 minutes by using these two ropes.

How can you do it?

Please note that you can’t break the rope in half as it is being clearly stated that the ropes are non-homogeneous in nature.
Answer & Explanation Solution: 45 minutes

Explanation :
All you have to do is burn the first rope from both the ends and the second rope from one end only simultaneously. The first rope will burn in 30 minutes (half of an hour since we burned from both sides) while the other rope would have burnt half. At this moment, light the second rope from the other end as well. Where, the second rope would have taken half an hour more to burn completely, it will take just 15 minutes as we have lit it from the other end too.

Thus you have successfully calculated 30+15 = 45 minutes …

Hackerrank > SQL > Basic Select

Select
01-Select All
Given a City table, whose fields are described as +-------------+----------+ | Field       | Type     | +-------------+----------+ | ID          | int(11)  | | Name        | char(35) | | CountryCode | char(3)  | | District    | char(20) | | Population  | int(11)  | +-------------+----------+
write a query that will fetch all columns for every row in the table.

My Solution
SELECT*FROM city;
---------------------------------------------------------------------------------
02-Select by ID
Given a City table, whose fields are described as