Hey there! Sign in to join this conversationNew here? Join for free
    Offline

    2
    ReputationRep:
    (Original post by target21859)
    Someone asked this before but it wasn't answered. Is there an equation for the maximum number of passes for a bubble sort?
    Maximum number of passes is n-1, because in the worst case scenario, every item is in the wrong place (list is reversed) so every item will have to be moved to the correct place. Once you've done n-1 passes, the last item is already in the correct place so it's n-1 instead of n.

    I've attached a June 2015 IAL question where they asked for the maximum number of passes.


    Attachment 550495550497
    Attachment 550495550497
    Attached Images
      
    • Community Assistant
    Offline

    18
    ReputationRep:
    Community Assistant
    (Original post by farrl005)
    Can anyone help me with question 8 b on the june 2014 D1 paper?? I have no idea what to do haha

    https://d0247e65b1a6ead8e6286cd43803...%20Edexcel.pdf
    The gradient of the objective line must be between the gradient of AB and CD.
    Offline

    2
    ReputationRep:
    (Original post by NotNotBatman)
    The gradient of the objective line must be between the gradient of AB and CD.
    Why
    • Community Assistant
    Offline

    18
    ReputationRep:
    Community Assistant
    (Original post by Pablo Picasso)
    Why
    Hard to explain, but it's because if the objective lines gradient is equal to the gradient of BA, then it will pass through the points A and B at the same time, same with CD. If it was a little bit less than grad of BA then the objective line would cross B first, so in order for it to cross A first ( so that A is the minimum) grad of F > grad of BA where F is the objective line. It would be the same with CD, but less than.
    Offline

    1
    ReputationRep:
    (Original post by NotNotBatman)
    The gradient of the objective line must be between the gradient of AB and CD.
    ah thank you!
    • Community Assistant
    Offline

    18
    ReputationRep:
    Community Assistant
    (Original post by farrl005)
    ah thank you!
    But use the gradient BA instead of AB, as they should be calculated all going in the same direction, but I can't edit my post for some reason.
    Offline

    6
    ReputationRep:
    I hate D1 so much it's so boring ((((((( good luck for friday everyone!
    Offline

    2
    ReputationRep:
    Got this straight after M2 on Friday.

    As a helpful note, it would be worth knowing the definitions for the exam (just learn them on Friday morning or something). They come up every other year and didn't last year, so a question would be very likely.
    Offline

    3
    ReputationRep:
    Here because of my momonumental **** up of M3 and FP2, this is a nice break in comparison.
    Offline

    3
    ReputationRep:
    Has Slack ever come up in an exam? Or the triangle inequality?
    NotNotBatman
    Offline

    8
    ReputationRep:
    How do you find the objective function to draw the objective line on the Jan 15 IAL paper please? Question 6(d)

    https://d0247e65b1a6ead8e6286cd43803...%20Edexcel.pdf
    Offline

    11
    ReputationRep:
    When on a dijkstras problem and it asks you to find the shorted round via another node, what's the best way to work out the answer to this?

    I've just been using trial and error
    Offline

    2
    ReputationRep:
    (Original post by Katiee224)
    When on a dijkstras problem and it asks you to find the shorted round via another node, what's the best way to work out the answer to this?

    I've just been using trial and error
    Do you have a specific question? You usually have to use a different final value for the last node in order to work backwards
    Offline

    2
    ReputationRep:
    (Original post by Katiee224)
    When on a dijkstras problem and it asks you to find the shorted round via another node, what's the best way to work out the answer to this?

    I've just been using trial and error
    (Original post by Glavien)
    How do you find the objective function to draw the objective line on the Jan 15 IAL paper please? Question 6(d)

    https://d0247e65b1a6ead8e6286cd43803...%20Edexcel.pdf
    (Original post by NotNotBatman)
    But use the gradient BA instead of AB, as they should be calculated all going in the same direction, but I can't edit my post for some reason.
    What's the hardest paper you guys have done?
    Offline

    18
    ReputationRep:
    (Original post by Katiee224)
    When on a dijkstras problem and it asks you to find the shorted round via another node, what's the best way to work out the answer to this?

    I've just been using trial and error
    So you want the shortest route from A to G via D. Take your final value at D (since that's the shortest route to D) and just work from there. It's usually very simple and if not just do some calculations on paper
    Offline

    2
    ReputationRep:
    How long does a D1 paper normally take you?
    And if they ask you for the reason for using dummies, how do you word it, assuming it's not the dependacy reason?
    Offline

    11
    ReputationRep:
    (Original post by techfan42)
    What's the hardest paper you guys have done?
    I'd say do the International papers if you're looking for the hardest.
    • Community Assistant
    Offline

    18
    ReputationRep:
    Community Assistant
    (Original post by Glavien)
    How do you find the objective function to draw the objective line on the Jan 15 IAL paper please? Question 6(d)

    https://d0247e65b1a6ead8e6286cd43803...%20Edexcel.pdf
    Let P = ax+3ay for any value of a. (a is the cost)

    (Original post by Katiee224)
    When on a dijkstras problem and it asks you to find the shorted round via another node, what's the best way to work out the answer to this?

    I've just been using trial and error
    You could use the working values. If that doesn't work, say you needed to find the shortest from s to t via f. Find the shortest from f to t, then the shortest from s to f.
    Offline

    18
    ReputationRep:
    (Original post by Pablo Picasso)
    How long does a D1 paper normally take you?
    And if they ask you for the reason for using dummies, how do you word it, assuming it's not the dependacy reason?
    2 hours lol I'm f***ed

    Dummy enables unique representation of activities in terms of their end events
    Offline

    11
    ReputationRep:
    (Original post by Student403)
    So you want the shortest route from A to G via D. Take your final value at D (since that's the shortest route to D) and just work from there. It's usually very simple and if not just do some calculations on paper
    will bare that in mind, cheers
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Brussels sprouts
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.