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

D1 finding maximum number of comparisons in a bubble sort ambiguous watch

    • Thread Starter
    Offline

    2
    ReputationRep:
    https://d0247e65b1a6ead8e6286cd43803...%20Edexcel.pdf


    Q2B

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

    Are what edexcel alluding to is:

    12 -> 6 -> 3 -> 1

    Therefore 4 comparisons?

    thnx
    • Community Assistant
    Offline

    18
    ReputationRep:
    Community Assistant
    Which question is the bubble sort one?
    • Thread Starter
    Offline

    2
    ReputationRep:
    (Original post by NotNotBatman)
    Which question is the bubble sort one?
    2b it is binary not bubble.

    D1 will do that to you
    • Community Assistant
    Offline

    18
    ReputationRep:
    Community Assistant
    You can divide the number of items by 2 until the result is <1 and the number of times you divided it is the number of comparisons.
    I usually just put it in my calculator and count.

    it's because if you have 11 names, you'll have two sublists one with 6 names and one with 5 names and for the max number of comparisons you delete the list with 5 names. And you would always delete the list with less names for max comparisons.
    • Thread Starter
    Offline

    2
    ReputationRep:
    (Original post by NotNotBatman)
    You can divide the number of items by 2 until the result is <1 and the number of times you divided it is the number of comparisons.
    I usually just put it in my calculator and count.

    it's because if you have 11 names, you'll have two sublists one with 6 names and one with 5 names and for the max number of comparisons you delete the list with 5 names. And you would always delete the list with less names for max comparisons.

    Thank you perfect.
 
 
 
Reply
Submit reply
Turn on thread page Beta
Updated: March 17, 2016
Poll
Do I go to The Streets tomorrow night?
Useful resources

Make your revision easier

Maths

Maths Forum posting guidelines

Not sure where to post? Read the updated guidelines here

Equations

How to use LaTex

Writing equations the easy way

Student revising

Study habits of A* students

Top tips from students who have already aced their exams

Study Planner

Create your own Study Planner

Never miss a deadline again

Polling station sign

Thinking about a maths degree?

Chat with other maths applicants

Can you help? Study help unanswered threads

Groups associated with this forum:

View associated groups

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.