A hint please.

  • #1
Can anyone give me hints on the following question.I do not know how to proceed.

Find all integers a,b,c,d satisfying the following relations
i) [tex]1 \leq a \leq b \leq c \leq d[/tex]
ii) ab+cd = a+b+c+d+3

thanks
 

Answers and Replies

  • #2
berkeman
Mentor
59,630
9,766
Well, since 1,2,3,4 didn't work, I'd try next to write a quick program or use Excel to see what some of the solutions look like.
 
  • #3
berkeman
Mentor
59,630
9,766
Well I got at least one solution in Excel. Now if I could prove that it's the only one.....
 
  • #4
0rthodontist
Science Advisor
1,230
0
I got 4 solutions using Haskell
[[1,1,2,6],[1,2,2,6],[2,2,2,5],[2,2,3,3]]
These are the only solutions where all values are between 1 and 20. To show that they are they only four (which I'd guess they are) you can use an argument based on how fast ab + cd grows versus how fast a + b + c + d + 3 grows.

Incidentally, because I like to show off Haskell, this is what my code looks like
Code:
-- f just generates all possible lists of length k where each element is at least as great as the next element.
-- I wanted to do this efficient-like, which is why this may be a little confusing.  
f min n 0 = [[]]
f min n k = foldr (++) [] [[a:as | as <- (f a n (k-1))] | a <- [min..n]]

-- If I had done it the easy way instead of the efficient way using f 
-- then then I would have just let x = [[a,b,c,d] | a<-[1..20],b<-[1..20],c<-[1..20],a*b+c*d==a+b+c+d+3 && a >= b && b >= c && c >= d]
-- and not defined f or y
y = f 1 20 4
x = [[a,b,c,d] | [a,b,c,d] <- y, a*b+c*d==a+b+c+d+3]
Then in the interpreter I just typed x.
 
Last edited:
  • #5
write the above equation like (a-1)(b-1) + (c-1)(d-1) = 5..... also, because of the first condition the second term is greater than or equal to the first term.......and since they are all positive integers..............

can you work out the rest.....????
 

Related Threads on A hint please.

  • Last Post
Replies
1
Views
2K
Replies
4
Views
3K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
8
Views
2K
Replies
1
Views
1K
  • Last Post
Replies
7
Views
2K
Replies
11
Views
2K
  • Last Post
Replies
3
Views
1K
  • Last Post
Replies
9
Views
2K
  • Last Post
Replies
4
Views
2K
Top