Counting Ordered Pairs

How many ordered pairs of integers ( x , y ) (x,y) are there, subject to 1 x 10 , 1 y 10 1 \leq x \leq 10, 1 \leq y \leq 10 , such that

( x 5 ) ( y 5 ) = 0 ? (x-5)(y-5) = 0?

Details and assumptions

For an ordered pair of integers ( a , b ) (a,b) , the order of the integers matter. The ordered pair ( 1 , 2 ) (1, 2) is different from the ordered pair ( 2 , 1 ) (2,1) .


The answer is 19.

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.

18 solutions

Nahom Yemane
Dec 30, 2013

one of them has to be 5 the other can be between 1 an 10 so 10 ways. You can switch x and ys around so double it to get 20 But you just counted 5,5 twice so take away 1 to get:

19 \boxed{19}

solve this: The function f(x) satisfies the equation f(x) = f(x−1)+f(x+1) for all values of x. If f(1) =1 and f(2) = 3, what is the value of f(2013)?

Sälmän Rähmän - 7 years, 4 months ago

Log in to reply

f(2013)=4026??

Stephene Coresis - 7 years, 3 months ago

Log in to reply

f(2013) = 3

prashant patel - 7 years, 3 months ago

f(x) cyclic in nature with cyclicity of 6.... f(2013) equivalent to f(2)= 3

rajat verma - 7 years, 2 months ago

good solution.

TEHREEM SADAQAT - 7 years, 3 months ago
Md Saiful Islam
Dec 30, 2013

The equation ( x 5 ) ( y 5 ) = 0 (x-5)(y-5)=0 is only correct if x=5 or, y=5 or, both.

Now, when x=5, for every y with 1<=y<=10 we get an ordered pair which is a solution.

For example, (5,1),(5,2),(5,3).....(5,9),(5,10) every ordered pair satisfies (x-5)(y-5)=0

Note, (5,5) is a possible ordered pair.

So, there are 10 ordered pairs.

Now compute for y=5.

for every x with 1<=x<=10 we get ordered pairs (1,5),(2,5),.....(10,5) which satisfies our problem.

Note, We again get a (5,5) in this case.

Now note that, (1,5) and (5,1) are two different ordered pair. But, (5,5) and (5,5) is same.

So, we have totally 10+10-1(as there is an ordered pair which is common to both cases)=19 different ordered pairs.

good explenation

Bedadipta Bain - 7 years, 3 months ago

dont understand clear concept

Sowmy Vivek - 7 years, 4 months ago

Log in to reply

pairs are (5,1),(5,2),(5,3),(5,4),(5,5),(5,6),(5,7),(5,8),(5,9),(5,10)and(1,5),(2,5),(3,5),(4,5),(6,5),(7,5),(8,5),(9,5),(10,5). second time i have not written (5,5) after (4,5) because it is already in the above least. so 19

diltang tong - 7 years, 4 months ago

nice solution

Ranjith Reguri - 7 years, 4 months ago
Yash Jakhotiya
Dec 30, 2013

The eqn holds true i) for x=5,y=any no. and ii)for y=5,x=any no. As we have range from 1 to 10, for i) we have 10 solutions, for ii) we have 10 solutions. Now adding 10 and 10 and subtracting a common solution (5,5), we get ans. 19

Raghav Dua
Dec 30, 2013

//include iostream statement comes here. Rest follows

using namespace std;

bool isPair (const int& x, const int& y) {

if ((x - 5) * (y - 5) == 0) {

return (true);

}

else {

return (false);

}

}

int main (int argc, char* argv []) {

int counter (0);

for (int x = 1; x <= 10; x++) {

for (int y = 1; y <= 10; y++) {

  if (isPair (x, y) == true) { counter++; }

}

}

cout << counter << endl;

return (0);

}

Please give your solution based on Combinatorics not code.

Md Saiful Islam - 7 years, 5 months ago

There's a plethora of solutions at the table. Nobody's forcing you to look at code.

Raghav Dua - 7 years, 5 months ago
Raj Shekhar
Mar 26, 2014

with x=5 there are 10 possible values of y with y=5 there are 10 ppossible values of x .answer is 20 but there are two ordered pairs with (5,5)therefore answer if 19

Prashant Patel
Mar 11, 2014

if you want (x-5)(y-5)=0 then x 0r y must be 5. and as x and y both are >=1 and <=10 we have 10 pair for each x=5 and y=5. So total 20 pair. But in this 20 pair (5,5) is repeating so 19 pairs.

Adrian Delgado
Mar 4, 2014

We have two cases:

x 5 = 0 x-5 = 0

We have 1 choice for x and 10 for y, then we have 10 ordered pairs

y 5 = 0 y-5 = 0

We have 10 choices for x and 1 for y, so we have 10 ordered pairs

Thus, we have 20 ordered pairs, but we must take one, because a pair was counted twice (the pair ( 5.5 ) (5.5) )

So are 19 ordered pairs.

Shubham Poddar
Mar 2, 2014

If the first factor is zero then x will be 5 and y may be any no from 1to10 and hence the ordered pairs are (5,1);(5,2);(5,3);(5,4);(5,5);(5,6);(5,7);(5,8);(5,9) and (5,10).

Similarly if the second factor is zero then the value of y will be 5 and the value of x will be any no from 1 to 10 and hence the ordered pairs are (1,5);(2,5);(3,5);(4,5);(4,5);(5,6);(5,7);(5,8);(5,9) and (5,10) as we can not take (5,5) two times.

Ajith Gade
Jan 27, 2014

we have to give 5 value for x or y or both
for x=5 no of values of y is 10 then no of ordered pairs are 10
similarly for y=5 no of ordered pairs 10
in those ordered pairs (5,5) repeated
total pairs 10+10-1=19



Nick De Ruyck
Jan 20, 2014

For x = 5 or y = 5, we find 19 unique solutions: {(5,1),(5,2),...,(5,5),...,(5,10),(1,5),(2,5),...,(10,5)} Of course you may not count (5,5) twice!

Finn Hulse
Jan 19, 2014

As long as either x or y equals 5, then the result will be zero. So if x is 5, then there will be 10 other numbers to choose y. If y is 5, there will be 10 ways to choose x. So it would seem that the answer would be 20, but it's actually 19, because it counts x=5, y=5 twice.

Jeremi Litarowicz
Jan 10, 2014

We first notice that either x = 5 x=5 or y = 5 y=5 . Start by assuming that x = 5 x=5 . There are 10 such possibilities as y y can independently take on 10 values. Next, consider the case where y = 5 y=5 . In this case there are also 10 possibilities, but we have counted one twice, the one where both x x and y y are equal to 0 0 . So the total amount of ordered pairs is 10 + 10 1 = 19 10+10-1=\boxed{19}

Ahsanul Habib
Jan 7, 2014

X=5 then y will any of 1 to 10

when y=5 then x=1to 10

but there is a common pair (5,5)

so we have 10+10-1=19 ordered pairs

Joe Blow
Jan 5, 2014

Both x=5 and y=5 solve the equation as well as any combination containing at least one of the two. But, since we are looking for ordered pairs, (5,5) can only be counted once.

i.e.:

(5,1), ....., (5,5), .......(5,10) & (1,5), ....., (5,5), ........(10,5) ↪there are 19 ordered pairs.

Marcos Oliveira
Jan 3, 2014
  • Para x = 5 e y vai de 1 à 10: --------> (5,1),(5,2)(5,3),(5,4)(5,5)....(5,10).

  • Para y = 5 e x varia de 1à 10: -------> (1,5),(2,5)(3,5),(4,5)(5,5)....(10,5).

O total é 20, mas como temos o par ordenado (5,5) repetido subtraímos 1.

Assim teremos -------> 20 -1 = 19 \boxed{19} pares

Cf Paul
Jan 1, 2014

(x-5)(y-5)=0 if either (x-5) or (y-5) or both are zero. This happens when either x or 5 or both are equal to 5. The possible ordered pairs are 9 of the form (x,5) , 9 (5,y) and (5,5). That gives a total of 19 ordered pairs

Ben Will
Dec 30, 2013

If we want the equation is equal to 0 we need one part of the bracket is 0.

fo example:(x-5)(5-5)=0 or (5-5)(y-5)=0

hence (9)(1)+(9)(1)+1=19

Hùng Minh
Dec 30, 2013

(x−5)(y−5)=0 <=> x = 5 or y = 5. When x = 5, y can be 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 <=> we have 10 pair of (x, y). When y = 5, x can be 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 <=> we have 10 pair of (x, y). But in 20 pair of (x, y) have two same pair (5, 5). So, the result is 19

Why 19 and not 21?

Ewerton Xavier - 7 years, 5 months ago

Log in to reply

if 5 , 5 5,5 is a pair

Ewerton Xavier - 7 years, 5 months ago

it is because we've doublecounted the pair ( 5 , 5 ) (5,5) , so we must eliminate one of them, or in other word, substract one from 20 20 , which gives 19 19

Muh. Amin Widyatama - 7 years, 5 months ago

Maybe my writting English skill is bad, so you don't understand me. I'm sorry. My answer is the same as Muh. Amin Widyatama

Hùng Minh - 7 years, 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...