Counting number of integers between two given integers

This topic has expert replies
Senior | Next Rank: 100 Posts
Posts: 40
Joined: Tue Jun 24, 2008 8:36 am
Hi
Can someone please help with some tip on the following:

One thing that confuses me is when i see a question that requires counting the number of integers between two given integers, for example in the problem below:

"Certain cards are numbered from 101 to 350. What is the probability of getting a card with hundreds digit equal to 2"

In the above problem first part is to count the total number of numbers between 101 and 350 (both inclusive) and the second part requires counting all the numbers between 200 and 299.
Though it seems trivial but i get confused in such calculation and end up wasting a lot of time. Can someone suggest a technique or formula to do such inclusive or exclusive counting between integers quickly or without confusion?

Any help will be great.

Thanks.
Source: — Problem Solving |

Legendary Member
Posts: 1153
Joined: Wed Jun 20, 2007 6:21 am
Thanked: 146 times
Followed by:2 members

by parallel_chase » Sun Aug 17, 2008 9:22 pm
if you have to calculate all the integers between 1 and 10 inclusive of both

[10-1] + 1 = 10

if you have to calculate all the integers between 1 and 10 exclusive of both

[10-1] -1 = 8, it doesnt include 1 and 10


credit card number with 2 at hundreds place.

[299-200] + 1 = 100, which is including 200 and 299

number of total integers

[350-101] + 1 = 250, which is including 101 and 350

probability= 100/250 = 2/5

Hope this helps.