Maths puzzle time!

2»

Comments

  • greg66_tri_v2.0
    greg66_tri_v2.0 Posts: 7,172
    edited November 2013
    Some of them (eg problem 6) require little more than Excel. I take it that's not the done thing though, is it?

    Eta: Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

    Meh. Brute force.
    Swim. Bike. Run. Yeah. That's what I used to do.

    Bike 1
    Bike 2-A
  • itboffin
    itboffin Posts: 20,052
    So lets go there ...

    Lets say you have a cluster of ubber fucking expensive load balancers caching static media objects at lets say 10 Gbps across the cluster, then lets say you have a shite load of websites serving more than 110 uniquely designed, completely different web sites serving 6 millions hits per day, back ended by one of the largest high performance web pools in the world ........

    How many connections does on a single bod (you/me) generate per visit per site / per page per transaction ?

    answer that I'll give you a job tomorrow :roll:
    Rule #5 // Harden The Feck Up.
    Rule #9 // If you are out riding in bad weather, it means you are a badass. Period.
    Rule #12 // The correct number of bikes to own is n+1.
    Rule #42 // A bike race shall never be preceded with a swim and/or followed by a run.
  • dhope
    dhope Posts: 6,699
    Some of them (eg problem 6) require little more than Excel. I take it that's not the done thing though, is it?
    I solved most of mine with Excel. Soon though the numbers get too big and you need to use a programming language instead. There are some very elegant solutions, none of which I've come up with.
    Rose Xeon CW Disc
    CAAD12 Disc
    Condor Tempo
  • itboffin
    itboffin Posts: 20,052
    itboffin wrote:
    So lets go there ...

    Lets say you have a cluster of ubber ******* expensive load balancers caching static media objects at lets say 10 Gbps across the cluster, then lets say you have a shite load of websites serving more than 110 uniquely designed, completely different web sites serving 6 millions hits per day, back ended by one of the largest high performance web pools in the world ........

    How many connections does on a single bod (you/me) generate per visit per site / per page per transaction ?

    answer that I'll give you a job tomorrow :roll:

    Oh yeah and fuck it up and you'll lose that job as well :roll:
    Rule #5 // Harden The Feck Up.
    Rule #9 // If you are out riding in bad weather, it means you are a badass. Period.
    Rule #12 // The correct number of bikes to own is n+1.
    Rule #42 // A bike race shall never be preceded with a swim and/or followed by a run.
  • itboffin wrote:
    So lets go there ...

    Lets say you have a cluster of ubber ******* expensive load balancers caching static media objects at lets say 10 Gbps across the cluster, then lets say you have a shite load of websites serving more than 110 uniquely designed, completely different web sites serving 6 millions hits per day, back ended by one of the largest high performance web pools in the world ........

    How many connections does on a single bod (you/me) generate per visit per site / per page per transaction ?

    answer that I'll give you a job tomorrow :roll:

    Definitely more than 11. 16?
    Swim. Bike. Run. Yeah. That's what I used to do.

    Bike 1
    Bike 2-A
  • itboffin
    itboffin Posts: 20,052
    that'll be when i suggested cheese everyone gave me funny looks :evil:
    Rule #5 // Harden The Feck Up.
    Rule #9 // If you are out riding in bad weather, it means you are a badass. Period.
    Rule #12 // The correct number of bikes to own is n+1.
    Rule #42 // A bike race shall never be preceded with a swim and/or followed by a run.
  • itboffin
    itboffin Posts: 20,052
    here's another for you this doesnt win a job slaving for itboffin, this one might earn you a nodding glance / slash backrub

    Your database server has a fairly old but stable linux 2.6 kernel, 32 cpu cores and 128Gb+ of ram you notice problems with SQL selects taking several seconds and load average climbing

    why?
    what would you do to fix it?
    Rule #5 // Harden The Feck Up.
    Rule #9 // If you are out riding in bad weather, it means you are a badass. Period.
    Rule #12 // The correct number of bikes to own is n+1.
    Rule #42 // A bike race shall never be preceded with a swim and/or followed by a run.
  • rjsterry
    rjsterry Posts: 27,749
    rjsterry wrote:
    May I refer you to the stacked bricks problem I mentioned in your previous thread.

    BTW, am I detecting a wish for a change of career?


    Took a somewhat linear approach to that, and assumed that the overhang of each new domino placed on the stack had to be the same amount as the previous overhang - ie a stack with a fixed straight line tilt. The question then is whether you can ever place a domino on the stack that sits wholly outside the footprint of the domino at the base, and if not, why not. Managed in the end to work out a generalised proof as to why you can't.

    The harmonic series and the curved line tilt is a bit beyond what I can dreg up from my days of doing sums. Used to be able to do that stuff, but it's all too rusty now. Depressing.

    I've often thought that I'd quite like to be a maths teacher at GCSE and A level, but the big obstacle is the need to keep myself in the lifestyle to which I have become addicted...

    The first 'straight stack' solution is pretty straightforward. There's a proof of the 'harmonic curve' stack here. There are built examples of stacked 'arches' and vaults in ancient Mayan architecture and the work of Antoni Gaudi (Collegio Teresiano).

    Where it gets interesting is if you start putting more than one brick in a layer. The maths gets a fair bit more tricky, but you can make the stack overhang as far as you want.

    http://www.math.dartmouth.edu/~pw/papers/sodaproc2.pdf
    1985 Mercian King of Mercia - work in progress (Hah! Who am I kidding?)
    Pinnacle Monzonite

    Part of the anti-growth coalition
  • itboffin wrote:
    here's another for you this doesnt win a job slaving for itboffin, this one might earn you a nodding glance / slash backrub

    Your database server has a fairly old but stable linux 2.6 kernel, 32 cpu cores and 128Gb+ of ram you notice problems with SQL selects taking several seconds and load average climbing

    why?
    what would you do to fix it?

    That is a *definite* turn it off and turn it on again job.

    Or it's a reformat the hard drive and reinstall Windows and your programmes.

    Certainly one of those two.
    Swim. Bike. Run. Yeah. That's what I used to do.

    Bike 1
    Bike 2-A
  • cjcp
    cjcp Posts: 13,345
    My God...

    (By the way, is it "maths" or "math"?)
    FCN 2-4.

    "What happens when the hammer goes down, kids?"
    "It stays down, Daddy."
    "Exactly."
  • tgotb
    tgotb Posts: 4,714
    itboffin wrote:
    here's another for you this doesnt win a job slaving for itboffin, this one might earn you a nodding glance / slash backrub

    Your database server has a fairly old but stable linux 2.6 kernel, 32 cpu cores and 128Gb+ of ram you notice problems with SQL selects taking several seconds and load average climbing

    why?
    what would you do to fix it?
    Rowcount increasing? Add indices.
    Pannier, 120rpm.
  • stu-bim
    stu-bim Posts: 384
    itboffin wrote:
    So lets go there ...

    Lets say you have a cluster of ubber ******* expensive load balancers caching static media objects at lets say 10 Gbps across the cluster, then lets say you have a shite load of websites serving more than 110 uniquely designed, completely different web sites serving 6 millions hits per day, back ended by one of the largest high performance web pools in the world ........

    How many connections does on a single bod (you/me) generate per visit per site / per page per transaction ?

    answer that I'll give you a job tomorrow :roll:

    Most IT people I have worked with use best guess and trial and error
    Raleigh RX 2.0
    Diamondback Outlook
    Planet X Pro Carbon
  • stu-bim
    stu-bim Posts: 384
    I've often thought that I'd quite like to be a maths teacher at GCSE and A level, but the big obstacle is the need to keep myself in the lifestyle to which I have become addicted...

    +1 but maybe a primary school teacher but was always rubbish at Irish. I considered it for a long time when in school but fell into accountancy. Still every 3/4 years consider a career change but always chicken out or moving country but still a f******* accountant.
    Raleigh RX 2.0
    Diamondback Outlook
    Planet X Pro Carbon
  • itboffin
    itboffin Posts: 20,052
    TGOTB wrote:
    itboffin wrote:
    here's another for you this doesnt win a job slaving for itboffin, this one might earn you a nodding glance / slash backrub

    Your database server has a fairly old but stable linux 2.6 kernel, 32 cpu cores and 128Gb+ of ram you notice problems with SQL selects taking several seconds and load average climbing

    why?
    what would you do to fix it?
    Rowcount increasing? Add indices.

    Sadly far far more basic linux kernel bug 2.6 is showing its age these days, we changed one kernel parameter from always to never, problem disappeared within a few mins.

    The trouble with lots of cores and memory is a small problem can rapidly become huge if not detected quickly.
    Rule #5 // Harden The Feck Up.
    Rule #9 // If you are out riding in bad weather, it means you are a badass. Period.
    Rule #12 // The correct number of bikes to own is n+1.
    Rule #42 // A bike race shall never be preceded with a swim and/or followed by a run.
  • itboffin
    itboffin Posts: 20,052
    stu-bim wrote:
    itboffin wrote:
    So lets go there ...

    Lets say you have a cluster of ubber ******* expensive load balancers caching static media objects at lets say 10 Gbps across the cluster, then lets say you have a shite load of websites serving more than 110 uniquely designed, completely different web sites serving 6 millions hits per day, back ended by one of the largest high performance web pools in the world ........

    How many connections does on a single bod (you/me) generate per visit per site / per page per transaction ?

    answer that I'll give you a job tomorrow :roll:

    Most IT people I have worked with use best guess and trial and error

    Yes however the problem with that when you're providing those services as a transactional service is the cost, get it wrong the customer loses money = BAD
    over provision hardware you lose money = BAD

    if you can't calculate what you need exactly now and for at least the next 12 months, you're always going to be on the edge of failure, its a tough job, keeps you on your toes for sure.
    Rule #5 // Harden The Feck Up.
    Rule #9 // If you are out riding in bad weather, it means you are a badass. Period.
    Rule #12 // The correct number of bikes to own is n+1.
    Rule #42 // A bike race shall never be preceded with a swim and/or followed by a run.
  • stu-bim
    stu-bim Posts: 384
    itboffin wrote:
    if you can't calculate what you need exactly now and for at least the next 12 months, you're always going to be on the edge of failure, its a tough job, keeps you on your toes for sure.

    I was only being facetious. I've built budgets for a hotel with over 4500 lines with multiple linked sheets utilising regression analysis, multiple drivers and scenarios and this is in a region where planning and budgeting is almost a dirty word.
    Raleigh RX 2.0
    Diamondback Outlook
    Planet X Pro Carbon
  • rjsterry
    rjsterry Posts: 27,749
    1985 Mercian King of Mercia - work in progress (Hah! Who am I kidding?)
    Pinnacle Monzonite

    Part of the anti-growth coalition
  • itboffin
    itboffin Posts: 20,052
    being on the inside of XX online industry for the last few years has been fascinating, i've learnt so much and discovered i actually knew a lot more about this industry than i originally thought i did just because of cross over skill in building ISP & wireless networks.

    I put this down a very good quality "engineering" problem solving and solution design background, see almost full circle to the OAP original dull thread :twisted:
    Rule #5 // Harden The Feck Up.
    Rule #9 // If you are out riding in bad weather, it means you are a badass. Period.
    Rule #12 // The correct number of bikes to own is n+1.
    Rule #42 // A bike race shall never be preceded with a swim and/or followed by a run.
  • cyclingprop
    cyclingprop Posts: 2,426
    itboffin wrote:
    being on the inside of XXX online industry for the last few years has been fascinating, i've learnt so much and discovered i actually knew a lot more about this industry than i originally thought i did just because of crossdressing and hands free action.

    I put this down a very dirty mind, see almost full circle to when I started our lusting after OAPs

    FTFY
    What do you mean you think 64cm is a big frame?
  • Not sure if anyone has got this yet? I'll have a go!

    Firstly calculate the distance from the corner to the mid-point of the base, call it b:
    b = sqrt(0.5a^2 + 0.5a^2)
    Then
    length_of_side, c = sqrt(b^2 + a^2)

    Mitre angle is half of Theta
    angle = 0.5 * cosine(b/c)