|
All you had to do is writing 'Tiny Encryption Algorithm' in Google...how sad...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
No Repost !
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
I'm a student currently taking up a Thesis subject, and our Research Title is "An Investigative study of Tiny Encryption Algorithm Security and Encryption Level". We're searching for some programs with an implementation of TEA (original version) with simple encryption and decryption of texts in C/C++/PHP. Can you help me?
|
|
|
|
|
Rhonnn wrote: our Research But you want someone else to do your work.
|
|
|
|
|
Rhonnn wrote: We're searching for some programs with an implementation of TEA (original version) with simple encryption and decryption of texts in C/C++/PHP.
Google is your friend. Learn to use it, a very much needed skill.
Rhonnn wrote: Can you help me?
Will I get credit and diploma ?
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Hi everyone,
If there is anything you don't understand in what I'm about to explain, feel free to express it, as english is not my mother language.
I'm working on a bus routing problem. I've been reading few papers about vehicule routing problem, network designing and stuff like that, in order to pick the algorithm that will fit the most what I want.
Seems like genetic algorithm is the most used for that kind of problem. However, I don't know if it fits with my specific demand, cause I have less constraints than in the applications covered in the papers, so I was wondering maybe there are "simpler" algorithms out there that can do the job.
Thing is I don't have no constraints regarding traffic or vehicle capacity nor designing the network itself : in fact, my input data are :
- Predefined bus lines with all the stops
- Distance between each point
- Schedules for each lines
So my work consists in determining how much buses do I need to optimize use time and distance for each bus used.
My real question is, should I keep looking into genetic algorithms even if I have less constraints than in the applications of it i've seen, or do you feel that there can be a more effective algorithm.
Thanks a lot for reading this
|
|
|
|
|
You should read about Linear Programming.
Linear programming - Wikipedia[^]
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
modified 21-Nov-16 13:09pm.
|
|
|
|
|
I would find it hard to pick an algorithm until I had defined what it means to "optimize use time and distance".
That's the type of statement a "salesman" would come up with; and which winds up sinking a project because nobody knows what it means (although everyone assumes everyone else knows what it means).
|
|
|
|
|
Hey guys,
Im stuck on this algorithm or problem for which I have to come up with a solution and create psuedocode for this. Any help would be appreciated.
"The Big British Brass Barrel Consortium (BBBBC) has a lot of barrels (made of brass). Every day they receive a large set of orders from other companies for their barrelling needs. Each company will send them a list of different fluids that they have, for which they need barrels to transport the fluids. The various amounts of fluids will be specified in terms of their volume in cubic metres. The BBBBC have a large stock of barrels and they store the height and diameter of their barrels in a database. Every day they need to work out if they have enough barrels in stock to fulfil the orders. If they don’t then they need to compile a list of the number and capacity of barrels that they’ll need to borrow from their competitors. Propose a solution to solve this problem."
Thats what I got to DO!
Also, Private messages would be appreciated.
|
|
|
|
|
A public message: this is your homework so you are expected, at the very least, to make an effort to solve it yourself.
|
|
|
|
|
We do not do your HomeWork.
HomeWork is not set to test your skills at begging other people to do your work, it is set to make you think and to help your teacher to check your understanding of the courses you have taken and also the problems you have at applying them.
Any failure of you will help your teacher spot your weaknesses and set remedial actions.
So, give it a try, reread your lessons and start working. If you are stuck on a specific problem, show your code and explain this exact problem, we might help.
As programmer, your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better.
When you just ask for the solution, it is like trying to learn to drive a car by having someone else training.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
Hi there,
I am interested in reading about the prediction of schedules/calendars. However, I am pretty sure I am looking for the wrong terminology (often finding papers to do with processor instruction scheduling etc.).
An example of something I want to achieve is: a user is logging each time they exercise during the day and for how long, over time this builds up a past schedule of their exercise routine. Based on that past routine, I would like to predict what the next day's exercise may be like taking into account patterns that emerge (for example, only swimming on thursday afternoons for 1hr).
What should I be looking for? What would this area be called? Any good examples of papers in this area? Thanks for your help!
Thanks,
Ronan
|
|
|
|
|
|
Neural networks.
You define a model: any perceived relationships between inputs and outputs; you "train" the model using historical data; then have the model "predict" an outcome based on new inputs. e.g.
Test Run - Dive into Neural Networks[^]
|
|
|
|
|
Hello,
For my new project, I have to develop an algorithm called frequency sweep.
The function parameters are nFreqStart, nFreqEnd and dSweepTime'.
As an example: for nFreqStart = 800Hz, the period T of this signal is 1.25ms, for nFreqEnd = 1600Hz, T is 0.625ms and the sum of all frequencies from nFreqStart to nFreqEnd must not be higher than dSweepTime.
My first version of this function is:
uint16_t nFrequencies;
void sweep_initialize(const uint16_t nFreqStart, const uint16_t nFreqEnd, const double dSweepTime)
{
double dTotalTime = 0.0;
double dIncrement = 0.0;
uint16_t nStep = 0;
double dTmpFreq = 0.0;
bool bSweep = true;
double dInitialTime = (1.0 / nFreqStart) + (1.0 / nFreqEnd);
nFrequencies = 2;
while (bSweep == true)
{
dTotalTime = dInitialTime;
dIncrement = (double)(nFreqEnd - nFreqStart);
dIncrement /= (double)(nFrequencies);
dTmpFreq = (double)nFreqStart;
nStep = nFrequencies - 1;
for (uint16_t i = 0; i < nStep; i++)
{
dTmpFreq += dIncrement;
dTotalTime += 1.0 / dTmpFreq;
}
nFrequencies += 1;
if (dTotalTime >= dSweepTime)
{
bSweep = false;
break;
}
}
}
The next thing is, I need a counter (cpu clocks) for each frequency:
uint16_t* pSweep_Array;
void sweep_getCounter()
{
if (pSweep_Array != NULL)
{
free(pSweep_Array);
pSweep_Array = NULL;
}
pSweep_Array = (uint16_t*)malloc(sizeof(uint16_t) * nFrequencies);
if(pSweep_Array != NULL)
memset(pSweep_Array, 0, sizeof(uint16_t) * nFrequencies);
double dFrequency = (double)nFreqStart;
double dIncrement = (double)(nFreqEnd - nFreqStart);
dIncrement /= (double)(nFrequencies - 1);
double dCounter = 0.0;
for (uint16_t i = 0; i < nFrequencies; i++)
{
dCounter = 65536 - (F_CPU / dFrequency);
pSweep_Array[i] = (uint16_t)round(dCounter);
dFrequency += dIncrement;
}
}
But as a result, the computation complexity is O((n-1)! * n2), where n is the number of frequencies between nFreqStart and nFreqEnd, including nFreqStart & nFreqStop.
I need help for a less complex solution (function).
|
|
|
|
|
What I don't understand is why you do your first counter.
I guess my first question is: Why are you trying to calculate the frequencies of your CPU, but also how? You're just simply increasing an integer every time it loops?
In your first loop, your initialize, you set the nStep to one less than your frequencies? Literally all I'm seeing is that you are getting the summation of all numbers between 800 and 1600.
If all you need to do is calculate "the computation complexity... O((n-1)! * n2)" then you should do exactly that. But you're not doing that.
You're doing:
∑k=18000.001875/k
Instead just set n1 to nFreqEnd - nFreqStart and n2 to nFreqStop - nFreqStart.
Then plug it in.
I don't understand what O is, but plug that in too.
It would be helpful to know what you are returning exactly...
|
|
|
|
|
Hello, so I have to write a term paper on the subject of Root sorting. Google doesn't give me anything useful so I am here to ask someone who understands data structures and algorithms to give me some pointers on the subject. As far as I got is that I figured out it has something to do with sorting a binary tree and using the root of a binary tree. Can you please give me some insight on what algorithms should I look for or what book should I read?
|
|
|
|
|
Is that really what they said? It doesn't look like it's a thing.
|
|
|
|
|
Radix is Latin for root -> Radix Sorting!
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
Excellent, now it makes sense
|
|
|
|
|
It is really called Radix Sorting[^]. Radix is Latin and means root. So it seems to me someone bungled this up and it got "lost in translation".
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
You can read Corman to understand the basics of algorithm.
|
|
|
|
|
Why are you repiying to me?
Are you confused?
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
I am doing an introductory course on algorithms. I've come across this problem which I'm unsure about. I would like to know which of the 2 are dominant
f(n): 10 log n or g(n): log(n^2)
Given the definitions of each of: Ω, Θ, O
I assumed f(n), so fn = Ω(g(n))
Reason being that log(n^2) is equivalent to 2 log n, so 10 log n is dominant.
Could somebody verify or offer an alternative?
|
|
|
|
|
Why don't you draw the graph and see which one is closer to the bottom? Basically, these are just the grading system of the algorithms (used to classify the algorithms based on their complexity), to find out which is better as compared to which is not. I personally use only Big O notation (instead of others, lower bounds, both bounds etc. instead of all of that just consider Big O, and draw the graph). Go here and do that, https://www.desmos.com/calculator[^]. The larger that a function grows with each input, the more time and space that it consumes (time and space might be relative to the data source or the algorithm being used). That is why, a better algorithm is the one that doesn't take much time. In my opinion, log (n2) is a better function — look at the slopes that each of them makes.
Secondly, Quote: which of the 2 are dominant What do you mean by dominant? The better algorithm would have a lower slope as compared to the one with a higher slope (the higher slope one is a bad algorithm depending on the data source).
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|