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

    0
    ReputationRep:
    On the mark scheme of the June 2008 paper (AQA). Using pivot being the first letter. It creates a pivot on one letter on the 5th pass even though it is in the middle of two old pivots.

    I lost a mark but isn't this silly because there is nothing to compare it to as it is already obviously in the correct position.



    :eek3:
    Offline

    1
    ReputationRep:
    Nope, the mark-scheme is correct - when you do quick sort you need to pivot and then fix a value which is as of yet unfixed, even though you can see it is the only value in its sub-list.
    • Thread Starter
    Offline

    0
    ReputationRep:
    (Original post by Kestrel_Lover_Sophie)
    Nope, the mark-scheme is correct - when you do quick sort you need to pivot and then fix a value which is as of yet unfixed, even though you can see it is the only value in its sub-list.

    So even if it is comparing itself it counts as a comparison?
    Offline

    2
    ReputationRep:
    (Original post by Dave129)
    So even if it is comparing itself it counts as a comparison?
    Yes
    Edit: wait no....that's not right. The way I was taught it, we put | on both sides of the pivots so it kinda automatically included ones between two pivots.
    Offline

    6
    ReputationRep:
    (Original post by Dave129)
    So even if it is comparing itself it counts as a comparison?
    Yes, the list is only sorted once every item has been used as a pivot and fixed in place.
    Offline

    6
    ReputationRep:
    (Original post by Chrosson)
    Yes
    Edit: wait no....that's not right.
    eh?
    Offline

    2
    ReputationRep:
    (Original post by starofale)
    eh?
    I edited again
    e.g. with 2 3 1 > 2 1|3| > |1|2|3| done, despite not pivoting the 2
    Offline

    1
    ReputationRep:
    (Original post by Dave129)
    So even if it is comparing itself it counts as a comparison?
    Not sure about whether you'd count it if you were making a tally of total comparisons needed for the sort.
    I just know you need to write down another line of working to show that you have made that value a pivot and then fixed it...

    Why does D1 make me so inarticulate? :confused:
    Offline

    6
    ReputationRep:
    (Original post by Kestrel_Lover_Sophie)
    I just know you need to write down another line of working to show that you have made that value a pivot and then fixed it...
    Yes, this is what I was taught as well
    Offline

    2
    ReputationRep:
    (Original post by starofale)
    Yes, this is what I was taught as well
    I appear to have been taught differently.:iiam:
    Best to go by the mark scheme methinks.
    • Thread Starter
    Offline

    0
    ReputationRep:
    So...

    I think I got it sorted. You have to make sure you make every sublist one unit so you have to make the number/letter that is on it's own a pivot as well. When this happens it counts as NO comparisons. So in quick-sort you end up having all the numbers being a pivot in the end.

    Thanks,
    David.
 
 
 
Poll
Do you agree with the PM's proposal to cut tuition fees for some courses?
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.