Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 27th, 2006, 7:10 PM   #1
6431hoho
Newbie
 
Join Date: Feb 2006
Posts: 0
Rep Power: 0 6431hoho is on a distinguished road
Sorting Algorithms

If it's not so much trouble, could someone convert these (or only one) sorting algorithms into turing (programming language) please, I beg you. I have been working my ass off (science fair in 3 days) to write it in turing but have failed miserably.

3.3 Shell sort
3.4 Merge sort
3.5 Heapsort
3.6 Quicksort
3.7 Radix sort

Thank you very much.

All the algorithms are here:

http://en.wikipedia.org/wiki/Sort_algorithm
6431hoho is offline   Reply With Quote
Old Feb 27th, 2006, 7:16 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
This isn't a "Buy your schoolwork done here" forum. As a matter of fact, it's contrary to the rules. Certainly, doing another's work for them isn't in their best long-term interests. Generally speaking, one has been given enough time to accomplish one's assignments, unless one has been diddling and stink-fingering around.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Feb 27th, 2006, 7:25 PM   #3
andro
Professional Programmer
 
Join Date: Oct 2005
Location: California
Posts: 316
Rep Power: 4 andro is on a distinguished road
Send a message via AIM to andro
This is what happens when it gets done ONE TIME for some other kid
andro is offline   Reply With Quote
Old Feb 27th, 2006, 7:37 PM   #4
nnxion
Programming Guru
 
nnxion's Avatar
 
Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5 nnxion is on a distinguished road
Searching google for any of these will get your job done.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for."
-- Socrates
nnxion is offline   Reply With Quote
Old Feb 27th, 2006, 7:50 PM   #5
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 646
Rep Power: 4 Jessehk is on a distinguished road
I have to learn Turing, too. I know it's a bad language, but despite that, nobody will do your work for you. Research on google for pseudo-code.
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote
Old Feb 27th, 2006, 8:40 PM   #6
hoffmandirt
Hobbyist Programmer
 
hoffmandirt's Avatar
 
Join Date: Jul 2005
Location: PA
Posts: 125
Rep Power: 4 hoffmandirt is on a distinguished road
Send a message via AIM to hoffmandirt
What do you mean by bad language?
hoffmandirt is offline   Reply With Quote
Old Feb 27th, 2006, 9:05 PM   #7
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 646
Rep Power: 4 Jessehk is on a distinguished road
Quote:
Originally Posted by hoffmandirt
What do you mean by bad language?
I should have clarified. I don't really like it. It is too hard to do useful things (though I haven't really seen the language in its entirety).
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote
Old Feb 27th, 2006, 9:16 PM   #8
hoffmandirt
Hobbyist Programmer
 
hoffmandirt's Avatar
 
Join Date: Jul 2005
Location: PA
Posts: 125
Rep Power: 4 hoffmandirt is on a distinguished road
Send a message via AIM to hoffmandirt
I just googled it. I wasn't aware that there was a Turing language. Is it named in relation to Alan Turing or that a coincidence.
hoffmandirt is offline   Reply With Quote
Old Feb 27th, 2006, 9:21 PM   #9
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 646
Rep Power: 4 Jessehk is on a distinguished road
Wow, we're going waaaaay off topic.

http://en.wikipedia.org/wiki/Turing_...mming_language

It is based heavily off-of pascal.

for example, here is a program that will fill an array with squares:

var numbs : array 1 .. 5 of int

function square(n : int) : int
        result n * n
end square

for x : 1 .. 5
        numbs(x) := square(x)
        put x, "x", x, "=", numbs(x) : 5
end for

Maybe it's just my personal disdain...
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote
Old Feb 28th, 2006, 7:57 AM   #10
hoffmandirt
Hobbyist Programmer
 
hoffmandirt's Avatar
 
Join Date: Jul 2005
Location: PA
Posts: 125
Rep Power: 4 hoffmandirt is on a distinguished road
Send a message via AIM to hoffmandirt
Well I can't implement an alogorithm in Turing if I have never heard of it. Not that I would do this kids homework, but it's the thought that counts I suppose.
hoffmandirt is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:15 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC