fredreload Posted September 22, 2016 Share Posted September 22, 2016 Is there a way to use a huge amount of time for a decent compression on bits? Link to comment Share on other sites More sharing options...
Carrock Posted September 22, 2016 Share Posted September 22, 2016 Run the data through every compression program available, then use the one with the best results. That should take a reasonably huge amount of time. 1 Link to comment Share on other sites More sharing options...
Strange Posted September 22, 2016 Share Posted September 22, 2016 Use a really slow computer. There are quite a few compression algorithms that are asymmetric. For example, many video compression algorithms cannot be compressed in real time (or need specialised hardware to do so (1) ) but must (by definition) be decompressed in real time. The compression algorithm will do fairly complex image analysis to find parts of the image that have moved and then encode that as a vector ("this block of pixels has moved by dx, dy"). The decoder just needs to copy a block of pixels without any real "intelligence". (1) Or, at least, they did back in the day, when I was involved in such systems. Several racks of noisy hardware to do the compression. A cheap embedded processor to do the decode. Link to comment Share on other sites More sharing options...
fredreload Posted September 22, 2016 Author Share Posted September 22, 2016 (edited) Alright I got a question, assuming you have an array, 67142 that is sorted into 12467 from Bubble sort, how do you get the original sequence 67142 from 12467? Can you reverse run the program? P.S. Wait never mind problem solved, beat that Strange , you need to know how many pass you've ran though https://en.wikipedia.org/wiki/Bubble_sort Edited September 22, 2016 by fredreload Link to comment Share on other sites More sharing options...
Strange Posted September 22, 2016 Share Posted September 22, 2016 You would, I assume, also need to know what values were swapped at each pass. There is, in general, no algorithm for reversing a sort other than either recording the original order or recording what was done at each step of the sort. But well done for choosing a bubble sort if you want a slow algorithm. (Although it is one of the fastest algorithms on some parallel architectures.) Link to comment Share on other sites More sharing options...
fredreload Posted September 22, 2016 Author Share Posted September 22, 2016 (edited) You would, I assume, also need to know what values were swapped at each pass. There is, in general, no algorithm for reversing a sort other than either recording the original order or recording what was done at each step of the sort. But well done for choosing a bubble sort if you want a slow algorithm. (Although it is one of the fastest algorithms on some parallel architectures.) Thanks man, you are awesome, sorry about the challenge I made, I might have to start my calculation right after Big Bang, well, reversing is my specialty P.S. This is one of a few sorts I can do correctly in an exam Edited September 22, 2016 by fredreload Link to comment Share on other sites More sharing options...
fredreload Posted September 23, 2016 Author Share Posted September 23, 2016 (edited) Is there a better way for sorting binary numbers Strange? Edited September 23, 2016 by fredreload Link to comment Share on other sites More sharing options...
Strange Posted September 23, 2016 Share Posted September 23, 2016 There are many sorting algorithms. One of the best general purpose ones is quicksort. https://en.wikipedia.org/wiki/Quicksort You should be able to find a library with an implementation for whatever programming language you are using. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now