Hey there! Sign in to join this conversationNew here? Join for free
x Turn on thread page Beta
    Offline

    2
    ReputationRep:
    Someone asked this before but it wasn't answered. Is there an equation for the maximum number of passes for a bubble sort?
    • Community Assistant
    Offline

    18
    ReputationRep:
    Community Assistant
    (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?
    You mean maximum number of swaps? There isn't a maximum number of passes.

    max. swaps is \frac{n(n-1)}{2}
    Offline

    11
    ReputationRep:
    (Original post by NotNotBatman)
    You mean maximum number of swaps? There isn't a maximum number of passes.

    max. swaps is \frac{n(n-1)}{2}
    Why did you use the summation of 'r' for that?


    Posted from TSR Mobile
    Offline

    11
    ReputationRep:
    (Original post by NotNotBatman)
    You mean maximum number of swaps? There isn't a maximum number of passes.

    max. swaps is \frac{n(n-1)}{2}
    For question 7(e) why did they move activity J? I thought because it was a critical activity that had a start time of 15 and end time of 22, it had to always be between those values as it has no float. So, how come in the marks scheme they allowed it to start at 17 and end at 24? Thanks in advance!

    June 2014 (IAL)


    Posted from TSR Mobile
    • Community Assistant
    Offline

    18
    ReputationRep:
    Community Assistant
    (Original post by Glavien)
    Why did you use the summation of 'r' for that?


    Posted from TSR Mobile
    If you want to sort numbers in descending order, the maximum number of swaps comes from a list that is in ascending order. e.g sorting the numbers 2,1,3,4 and 5 in descending order; for the maximum number of swaps the initial list has to be 1,2,3,4,5.
    In the first pass there will be 4 comparisons then 3 then 2,1. So 1+2+3+4, sum of the first natural numbers, where the first term is (n-1)

    If you accept that \sum_{r=1}^{n}r = \frac{n}{2}(n+1) but there aren't dealing with numbers up to  n, but  n-1, so replace any  n in the formula with  (n-1)

    So \sum_{1}^{n}(n-1) = \frac{n-1}{2}[(n-1)+1] = n\frac{n-1}{2}

    EDIT: If the LaTEX is illegible, try pressing quote to see if that works.
    • Community Assistant
    Offline

    18
    ReputationRep:
    Community Assistant
    (Original post by Glavien)
    For question 7(e) why did they move activity J? I thought because it was a critical activity that had a start time of 15 and end time of 22, it had to always be between those values as it has no float. So, how come in the marks scheme they allowed it to start at 17 and end at 24? Thanks in advance!

    June 2014 (IAL)


    Posted from TSR Mobile
    The critical time is 22, but the question says within 25 days, so you can delay the project by 3 days.
    Offline

    11
    ReputationRep:
    (Original post by NotNotBatman)
    The critical time is 22, but the question says within 25 days, so you can delay the project by 3 days.
    Ohh, so every activity has an extra float of 3?
    • Community Assistant
    Offline

    18
    ReputationRep:
    Community Assistant
    (Original post by Glavien)
    Ohh, so every activity has an extra float of 3?
    No, but the total extra float for all activities combined is 3.
    Offline

    11
    ReputationRep:
    (Original post by NotNotBatman)
    No, but the total extra float for all activities combined is 3.
    Ohh, thanks for that!


    Posted from TSR Mobile
    Offline

    16
    ReputationRep:
    Just found a very juicy linear programming question I thought worth sharing

    https://gyazo.com/dd50f9bef7cc5f770da7f0a05488d71b
    Offline

    18
    ReputationRep:
    Quickest chapter to learn? From a string pure background. Need 15 ums ish.


    Posted from TSR Mobile
    Offline

    16
    ReputationRep:
    (Original post by physicsmaths)
    Quickest chapter to learn? From a string pure background. Need 15 ums ish.


    Posted from TSR Mobile
    Dijkstras algorithm/route inspection
    Offline

    18
    ReputationRep:
    (Original post by iMacJack)
    Dijkstras algorithm/route inspection
    Cheers mate appreciate.
    How many marks could I rack up learning this?


    Posted from TSR Mobile
    Offline

    16
    ReputationRep:
    (Original post by physicsmaths)
    Cheers mate appreciate.
    How many marks could I rack up learning this?


    Posted from TSR Mobile
    Dependent on the paper probably around 20 marks? It all depends on how the marks are allocated but i'd say a secure 15 marks, how comes you only need 15 ums?
    Offline

    18
    ReputationRep:
    (Original post by iMacJack)
    Dependent on the paper probably around 20 marks? It all depends on how the marks are allocated but i'd say a secure 15 marks, how comes you only need 15 ums?
    Mainly duento getting 95-100 On C1-4 FP1-3 M1-3 so I am doing AFM this year and I am confident in getting 95 ish M4-5 and thing I have gotten a B in S3 so I need to just get enough for the 480 overall for 3A*s aggregate in Maths FM and AFM which is 10 UMS in D1/2 and around a decent amount of UMS in S4. Stats and decision ain't really my thing.


    Posted from TSR Mobile
    Offline

    16
    ReputationRep:
    (Original post by physicsmaths)
    Mainly duento getting 95-100 On C1-4 FP1-3 M1-3 so I am doing AFM this year and I am confident in getting 95 ish M4-5 and thing I have gotten a B in S3 so I need to just get enough for the 480 overall for 3A*s aggregate in Maths FM and AFM which is 10 UMS in D1/2 and around a decent amount of UMS in S4. Stats and decision ain't really my thing.


    Posted from TSR Mobile
    Impressive, well done
    Offline

    18
    ReputationRep:
    (Original post by iMacJack)
    Impressive, well done
    Cheers, good luck for this exam btw, seems like a very tedious exam!


    Posted from TSR Mobile
    Offline

    16
    ReputationRep:
    (Original post by physicsmaths)
    Cheers, good luck for this exam btw, seems like a very tedious exam!


    Posted from TSR Mobile
    Thank you, you too! Yes it is tedious for sure, but I'm confident with it all apart from two little things! Which I can hopefully correct this week!
    Offline

    2
    ReputationRep:
    (Original post by iMacJack)
    Just found a very juicy linear programming question I thought worth sharing

    https://gyazo.com/dd50f9bef7cc5f770da7f0a05488d71b
    Thanks for this. Considering linear programming is one of the topics I feel less confident about, I need to practise it as much as possible. Thankfully I have extended study leave.

    Is anyone sitting M2 as well as D1 on Friday?
    Offline

    5
    ReputationRep:
    Hi, need your help on this question, I don't understand matchings Any help, appreciated.

    Name:  Screen Shot 2016-06-13 at 10.07.07.png
Views: 181
Size:  184.3 KB
 
 
 
Reply
Submit reply
Turn on thread page Beta
Updated: February 11, 2017
Poll
Are you going to a festival?

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

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