Graal Forums  

Go Back   Graal Forums > Search Forums
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Showing results 1 to 16 of 16
Search took 0.00 seconds.
Search: Posts Made By: Tolnaftate2004
Forum: NPC Scripting 04-23-2008, 11:56 PM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
I think it is feasible to shrink time to ~ aN +...

I think it is feasible to shrink time to ~ aN + O(N log N). How might we go about doing this? How do we get a logarithmic factor in our order? How can this help us speed up our algorithm?

This...
Forum: NPC Scripting 04-23-2008, 02:12 AM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
This can be disproved.

This can be disproved.
Forum: NPC Scripting 04-22-2008, 06:35 PM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
So I would use a hash, and it would still run in...

So I would use a hash, and it would still run in quadratic time. Also, the instructions say we're making this as efficient as possible in graal script.
Forum: NPC Scripting 04-22-2008, 09:53 AM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
Okay, well this thread has been dead for...

Okay, well this thread has been dead for sufficiently long time. Here is what I came up with; it takes quadratic time.

function onCreated() {
temp.p = getpatterns("THISISATESTSTRING");
for...
Forum: NPC Scripting 03-28-2008, 08:20 PM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
Give us pseudocode, then.

Give us pseudocode, then.
Forum: NPC Scripting 03-27-2008, 11:21 PM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
Now that's just uncalled for. :cry:

Now that's just uncalled for. :cry:
Forum: NPC Scripting 03-27-2008, 09:44 PM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
Yes, this is why I did not bother calculating the...

Yes, this is why I did not bother calculating the loops in your script. :p

e: Just made the realization that obj.substring() also contains a hidden for loop. Which makes all big-O calculations I...
Forum: NPC Scripting 03-27-2008, 07:47 AM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
The hard-coded for-loop is some multiple constant...

The hard-coded for-loop is some multiple constant faster than the graal script for-loop. This does not change the big-O.

If I pass a large enough string, an O(n^2) algorithm will always be faster...
Forum: NPC Scripting 03-27-2008, 05:34 AM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
Do you want me to rank them or tell you how...

Do you want me to rank them or tell you how efficient I think they are? x-x



The theory behind big-O notation is that it should be an accurate measure of code efficiency regardless of language...
Forum: NPC Scripting 03-27-2008, 02:04 AM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
This has always been the point of the Programming...

This has always been the point of the Programming Exercises. Perhaps you need to think differently to solve this problem by better methods, rather than the obvious...

@Chris, you started your...
Forum: NPC Scripting 03-26-2008, 09:49 PM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
This is big O notation, it is how we measure the...

This is big O notation, it is how we measure the efficiency of algorithms, without being hardware-specific. The O stands for order, which can take 2 meanings:
In mathematics, O(f) is for all terms...
Forum: NPC Scripting 03-26-2008, 07:26 PM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
Yours is still O(n³). e: The new standard...

Yours is still O(n³).

e: The new standard set by DrakilorP2P, O(n²)
@Ziro: Will keep that in mind. ;)
Forum: NPC Scripting 03-26-2008, 12:11 PM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
A solid color does not a pattern make.

A solid color does not a pattern make.
Forum: NPC Scripting 03-26-2008, 09:13 AM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
I have updated the guidelines slightly.

I have updated the guidelines slightly.
Forum: NPC Scripting 03-26-2008, 07:34 AM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
Nooooooot quite. This is closer (:)),...

Nooooooot quite.



This is closer (:)), but no doubt we can do better. ~O(n³)
Forum: NPC Scripting 03-26-2008, 02:44 AM
Replies: 55
Views: 38,101
Posted By Tolnaftate2004
Programming Exercise #3

In a string of N characters, calculate the frequencies of repeated patterns, e.g., given "AUGCCCGTAUACGTA", one would get CGTA:2, CGT:2, GTA:2, CG:2, GT:2, TA:2, AU:2, CC:2. You do not need to...
Showing results 1 to 16 of 16

 
Forum Jump

All times are GMT +2. The time now is 10:10 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.