LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview challenge

Oh well,

I didn't do any coding for the Vampire coding challenge. This theoretically would put me at a disadvantage but, I don't think I have the time to try my hand at this one anyway.

Won't stop me following the goings-on with great interest though.....

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 21 of 48
(2,967 Views)
Hey Bruce,

This is great news, I love the new challenge description! Now that is something worth coding for :).

I assume these are 10000 decimal digits.

It still hasn't posted yet, but I would hope they can push the submission date a bit in the future. "Late March" seems a bit early for a brand new challenge. I have too many things lined up in the next few weeks to seriously look into this but I'll try. I already made a few "pure integer" algoritms for the old challenge description, they should not be too hard to upgrade for big number math.

What kind of computer hardware does the 1.6 seconds? Is this top-of-the-line hardware?

(This might even be a problem solvable using an LabVIEW FPGA 😉 ... or maybe it's way too big??? Somebody with access to such hardware should try it!).
0 Kudos
Message 22 of 48
(2,958 Views)
Actually, I found an unnecessary step that reduced my time to just under 500 msec. With a little more work I am expecting a better reduction.

Right now I am using my laptop, a Dell Inspiron 8200 with a 1.6 GHz chip.

NI does plan on extending the deadline once they post the new rules, but I don't know when it will be. They will probably give us a couple of months with the new rules, maybe three.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 23 of 48
(2,946 Views)
I didn't even realize this discussion was already in the Forums! The update verison of the Challenge will go live by this Friday. Thanks to Bruce Ammons (one of our Coding Challenge masters!) for his suggestions and feedback with the Challenge. I've attached a Word version of it since some of you are wanting to know the newer version. I hope everyone enjoys...
J.R. Allen
0 Kudos
Message 24 of 48
(2,952 Views)
I didn't even realize this discussion was already in the Forums! The update verison of the Challenge will go live by this Friday. Thanks to Bruce Ammons (one of our Coding Challenge masters!) for his suggestions and feedback with the Challenge. I've attached a Word version of it since some of you are wanting to know the newer version. I hope everyone enjoys...
J.R. Allen
Message 25 of 48
(2,959 Views)
To give everyone plenty of time for the Challenge, the submission due date will be changed to May 5.
J.R. Allen
0 Kudos
Message 26 of 48
(2,888 Views)
So is anybody working on this challenge? I haven't seen any posts for a while.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 27 of 48
(2,742 Views)
Bruce,

Thanks for the reminder, 'guess it's time to look into this again. 🙂

I have a few well working algoritms for plain integers, should not be too difficult to translate them for ultra long integers and race them.

I love this particular challenge!
0 Kudos
Message 28 of 48
(2,709 Views)
Hi Bruce,

yes, I've been doing some work lately and hope to finish it up during the Easter holidays. I guess that other 'usual suspects' ('altenbach' e.g.) will be or become active soon.

Actually the challenge has a lot in common with the old 'factorial' challenge since in both it is important to know how to do a fast bigint multiplication. I guess you have some advantage since you won the factorial challenge already, and you figured this one out! (Shouldn't you be out of competition?) But since your solution is available on NI's homepage everybody has the chance to see how a fast bigint multiply can be done in Labview 😉

Regarding these coding challenge threads in the LV forum I see a dilemma (which might be a reason for the low traffic): some may be afraid to discuss details of possible algorithms and lower their own chances. But on the other hand such discussions would be very instructive and could make up a big part of the fun of the challenges (maybe even the bigger part).
What do others think?

What I also would like to learn is how fast the tasks are solved with other compilers. A comparison with C is maybe not fair, but what about LV vs. Java (which has a good bigint support)? (Un)fortunately I am exclusively with LV since years so I can't do the comparison myself, but maybe someone else out there can.

In order to compare one needs figures of course, and the only figure so far has been given by Bruce in an earlier mail, 500 msec on a 1.6 GHz machine, as far as I remember.
I think you have improved this in the meantime, Bruce. I reached (on a 2.2 GHz processor) 125 msec, but see some margin for improvement.

Anyway, this number-dropping is another part of the fun in the forum and it will certainly fuel everybody's ambition. I'm looking forward to see other numbers soon, especially some from Java/Delphi/C... environments.


Franz Ahlers
0 Kudos
Message 29 of 48
(2,679 Views)
I'm willing to share the basics of my approach, just not the fine details.

I am using the Newton-Raphson method to find the root. It requires all four simple algebraic operators: addition, subtraction, multiplication, and division. I already had the bigint multiplication worked out from the factorial challenge, although I modified it for this challenge. The addition and subtraction were fairly simple. Division was the biggest challenge, and it took a while to make it efficient.

My times are under 20 msec after a lot of work.

I would like to know if anybody is using a different method with success.

If anybody is looking for a place to start, I would recommend looking at my solution for the factorial challenge. It provides an idea of how to store the large numbers and manipulate them.

For benchmark tests, I am curious about the following times: square root of a 10000 digit number, 255th root of a 10000 digit number (should be much faster). For testing, it is convenient to hold one value constant (x, n, or y) and change another to see the effect.

Make sure you look at some difficult cases, also. Roots with all 9's, roots with almost all zeroes and just a couple of ones well spaced.

I have another challenge in the works, also. It involves prime factorization of large numbers - I really enjoy the large number challenges. The challenge for this one will be generating large prime numbers efficiently more than the large number math.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 30 of 48
(2,681 Views)