It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Q.1.2 List all the different ways to connect two different objects for the input/output in the table below:
Input | Output | Not Output (Connection Already Established)
3-4 3-4
4-9 4-9
8-0 8-0
2-3 2-3
5-6 5-6
2-9 2-3-4-9
5-9 5-9
7-3 7-3
4-8 4-8
5-6 5-6
0-2 0-8-4-3-2
6-1 6-1
A.1.2 (I don't understand this question) How would you answer this? That is you are given a pair, and if the nodes are not connected by other nodes already in the graph it outputs the pair else it does not output the pair because it is already connected based on the data that came before it.
As you describe it I would say
Your table describes a graph:
3<->4
4<->9
etc...
Now given 2 nodes (2 numbers) you need to find all the path from one to another. I guess you can look at this post for an optimise way to find all the paths :
Graph Algorithm To Find All Connections Between Two Arbitrary Vertices
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am working on a project in school and I need to create a 160 bit value. I haven't programmed in a while so I can't figure out how I would implement this. Any help would be appreciated.
You need a library for big integers (assuming you can't just take a ready-to-use cryptographic library).
First you create a random 160-bit value, not necessarily prime. Depending on the platform, you may use /dev/random, CryptGenRandom, or some other enthropy source(s), (possible several ones, combined).
Then you increment the value in a loop, applying e.g. Miller-Rabin (pseudo-)primality test to each candidate, until you find a prime number.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am using next_permutation in cpp (algorithm library). What is the upper limit on the length of the string which it can permute? As i can permute a string of length 5 easily but for length 50 it's just do not stop. I know 50! is quite large so i want to know if there is some reasonable limit on it's usage.
Well it works for as many numbers as your memory will fit. It simply takes longer. And by longer I mean that for 50! you will have to wait about 96442456880115988215412887386050129516671872047 years on a contemporary computer or a lot of orders of magnitute longer then the universe is supposed to exist.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to make a program that gets the information of a family including their names, SSN etc. I'm facing with two problems, firstly, what is the best data structure for this purpose,secondly, how should i get the information from the user, i mean when I'm getting info of father,i should determine his children, here is the problem.
how to connect his children to himself?
If it were me, I'd create a few different parallel arrays.
You're going to need to find out the algorithms for search through the arrays.
You're going to need to find out how to match them up together using the same index once the search finds a match. The index will probably be needed to be returned by reference to make things easier.
How to connect the children to the father maybe harder...
I don't know much about Binary Trees, we never talked about those in class. But that maybe the answer you're looking for. Sorry I couldn't be of more help. It's Christmas and it's 3AM lol. Good luck.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
how to group similar url using the DBSCAN algorithm. I have seen many datasets but none were on url , I want to take similar type of urls and group it together. Here i am not able to know distance (eps) and minpoints can be the number of urls to be grouped.
DBSCAN needs a distance function and a threshold for detecting similar objects.
So go ahead, first you need to define an appropiate distance function and a threshold, then we can help you with DBSCAN (but you should be able to find DBSCAN implementations that can be extened to arbitrary distance functions).
The key challenge is the distance, and this is up to you, because we do not know what you want to get out. This is very subjective, and we just don't know what you want or need.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
I'm trying to pick out my next hackery project. It'll likely be one of the following:
A sparse radix trie Implementation with extremely fast set operations
A really good soft heap implementation
A bloomier filter implementation
A collection of small financial algorithms, such as deriving total returns given a set of dividends and minimal information about them.
But I can't choose. So I thought I'd put my fate in the hands of my peers. Which of those four would you find most useful? Most interesting to work on? Which do you think is the most needed?
I didn't know what a bloomier (maybe Bloom?) filter is until reading your question. Sounds cool and useful.