Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

A hint please.

  1. Oct 19, 2006 #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

  2. jcsd
  3. Oct 20, 2006 #2


    User Avatar

    Staff: Mentor

    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.
  4. Oct 20, 2006 #3


    User Avatar

    Staff: Mentor

    Well I got at least one solution in Excel. Now if I could prove that it's the only one.....
  5. Oct 20, 2006 #4


    User Avatar
    Science Advisor

    I got 4 solutions using Haskell
    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 (Text):

    -- 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: Oct 20, 2006
  6. Oct 21, 2006 #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.....????
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: A hint please.
  1. Give me please hint (Replies: 1)

  2. Hints in a factoring (Replies: 8)

  3. Need a hint (Replies: 0)