Error recovery algorithms? [closed] - algorithm

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am doing a software that grabs in the end a numeric string, that string encodes important data, and any error destroy the contents.
Worse: It is VERY prone for errors, because of how data is transmitted (and I can do nothing about it).
So I decided to add a verification digit of sorts... After some research, I have more questions than answers... So, someone can point me to a decent location to study more about that subject?
Also, someone know some popular algorithms that can even fix errors, or at least point where the errors are, so I can retry grabbing the data with error?
Also what I do, if the checksum data itself managed to be wrong in transmission?

Hamming Code
simple pdf explanation of hamming code
Basically for every N bits of your message, you have some check bits.
You can detect and correct errors in the check bits, based on the data, or errors in the data, based on check bits. Too many errors though, and it's just garbage. There may be a utility in your language of choice to already do this.

This can be of use: http://www.eccpage.com/

Related

How do I get better at finding algorithms for problems? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
In programming, a lot of problems require you to find an efficient algorithm. So, if I want to be able to craft good algorithms that satisfy such criteria, what could I do? Is there any resources that help in training your algorithm development skills?
Help appreciated thanks!
Edit: I know that this question received hate, probably because it is not very agreeable to StackOverflow policies. Nevertheless, thanks Dylan Wright for taking the time to answer!
So most people are probably going to rip you apart for asking this question. No worries, just ignore. Algorithm go hand in hand with data structures in large amounts of data and/or some repetitive task. The key to the algorithm has a lot of different possibilities so there is no real straight forward answers. It mostly goes with what is the solution to what you are trying to improve. An algorithm is something as simple as parsing through an array of street addresses for your address application. To understand algorithms is really knowing what are common algorithms and how they work. Then you can educate yourself and maybe create one of your own. You should do some research on this.
To start look on blog sites like Medium.com
https://medium.com/#_marcos_otero/the-real-10-algorithms-that-dominate-our-world-e95fa9f16c04
Or just Google
http://www.geeksforgeeks.org/top-algorithms-and-data-structures-for-competitive-programming/

Is there a priority queue implementation in ATS? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I need to do some sort of priority-based search. Could someone point me to a priority queue implementation in ATS?
You can readily base a priority queue on a binomial heap.
There are two implementations of binomial heaps in ATS. Here are some use-cases:
https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATSLIB/libats_linheap_binomial.dats
https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATSLIB/libats_linheap_binomial2.dats
I came up with some unsafe C-based max-heap (based on somebody else's gist). I think that it does show that interfacing with C code in ATS, while generally unsafe, is very easy to do.
See the full sample at Glot.io
EDIT: here's another implementation, this time in ATS. It's a bit of a hassle to use, though (too many indexes in the type!), but the key salient feature of this code is that it is type-safe while also being extremely close to a typical C implementation in terms of runtime behavior.

Where is a good place to learn data structures? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am interested in learning data structures. Where should I learn them?
I have looked around Coursera but not sure if I will understand them.
I am also interested in data structures. It is a good part of CS to learn after Python or Java or C++ (a recommendation of many).
A good place would be UDemy. It has great instructors and nice courses.
The best way to master data structures is practice. Just take problems,
Step 1. try it on your own
Step 2. if you are unable to get it, see the solution
Step 3. try to write code to it.
Step 4. If you still face problems, see the code,trace it. Write on
your own.
References to Data Structures and Algorithms Problems:
1.<http://geeksforgeeks.org>
2.<http://leetcode.com>
3.<https://codechef.com>

Algorithm for grouping similar words (or short phrases) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am looking for an algorithm which would help me classify/group similar words (e.g., "Amazon.com" is similar to "Amazon" or "Amz" or "Amzon"). Levenshtein is a commonly suggested algorithm to use, but there are others like Jaro Winkler and such (for example, this is the Python library with a few word similarity metrics)
I'm wondering if those, who have done similar word aggregation/grouping, might have more effective suggestions. Thank you!
I have done something like this. I used Levenshtein with a lot of heuristics.
You should really look at the data and try to figure out what works best for you. Jaro Winkler works well for names. If you try to use it for md5 ids you're going to have a bad time.
If your strings are naturally very close to each other both approaches might not have insufficient granularity to help you, or you might need some more information from external sources.
In conclusion, try to setup some sandbox environment and try running different algorithms through the data and see which one works better. You can also look at the mistakes each algorithm makes and see if a) you can live with it or b) you can fix it easily.

Which language is best to handle extremely large numbers? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to handle extremely large integer values of a few million digits for an experiment I'm conducting.
Which language is best for this? I know some languages such as batch have pre-established limits on how many digits it can handle.
I have a large RAM and 64-bit OS, so my machine isn't a problem.
Regards,
-Master-chip
in python 3.x the int type does not have a limit so if you are just looking for a suggestion I would check out python.
see https://docs.python.org/3.1/whatsnew/3.0.html#integers
What are you looking to do with the numbers? If your number is larger than the maximum value of an unsigned 64 bit long is 18446744073709551615 then you won't be able to use the normal types and will want to look at languages that support bigInts http://docs.oracle.com/javase/6/docs/api/java/math/BigInteger.html
Honestly there are solutions for this in most languages you will just have to pick the one you want to work with and look at its solution
Can you store these values as Strings?
Do you need complete accuracy of the numbers or can you store them as floats

Resources