AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

2 simple guys
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java: Support and criticism
View previous topic :: View next topic  
Author Message
Kunnie
Guest





PostPosted: Wed Sep 14, 2005 1:29 pm    Post subject: 2 simple guys Reply with quote



hey guys,
thanx for posting,but ut programmes were 2 simple,we've already done
those in school.as for asking the teacher,well he is lazybum and an
abusive variety of humans and thus we have turned to u.ur fibonacci is
to simple.in the loop u just put(int i=3;i<=n;i++).i has been
designated three as the first 2 numbers have already been printed
outside the loop.ur porridge one requires the use of if,else if
statements...............too simple guys.

we were looking for something tougher,pls try to post such things which
are challenging.

kunal

Back to top
Oliver Wong
Guest





PostPosted: Wed Sep 14, 2005 2:38 pm    Post subject: Re: 2 simple guys Reply with quote



"Kunnie" <mankindlover89 (AT) gmail (DOT) com> wrote

Quote:
hey guys,
thanx for posting,but ut programmes were 2 simple,we've already done
those in school.as for asking the teacher,well he is lazybum and an
abusive variety of humans and thus we have turned to u.ur fibonacci is
to simple.in the loop u just put(int i=3;i<=n;i++).i has been
designated three as the first 2 numbers have already been printed
outside the loop.ur porridge one requires the use of if,else if
statements...............too simple guys.

we were looking for something tougher,pls try to post such things which
are challenging.

First of all, please reply to the thread you created, instead of
creating a new post, or else no one will have any context information to
know what you're talking about.

Secondly, you requested "programmes relating to loops,decision making
statements(if and switch) adn arrays." which makes it sound like you don't
know Java all that well. But you guys claim you do know Java pretty well,
which is why I said it's very difficult for us to recommend projects to you
because we have no idea what your skill levels are.

What's the most complex program you've written?

How about writing an expression evaluator, so if I give it the string
"(3 + 4 / 2) * 5 + 1", it returns the integer 26?

- Oliver



Back to top
Virgil Green
Guest





PostPosted: Wed Sep 14, 2005 2:56 pm    Post subject: Re: 2 simple guys Reply with quote



Kunnie wrote:
Quote:
hey guys,
thanx for posting,but ut programmes were 2 simple,we've already done
those in school.as for asking the teacher,well he is lazybum and an
abusive variety of humans and thus we have turned to u.ur fibonacci is
to simple.in the loop u just put(int i=3;i<=n;i++).i has been
designated three as the first 2 numbers have already been printed
outside the loop.ur porridge one requires the use of if,else if
statements...............too simple guys.

we were looking for something tougher,pls try to post such things
which are challenging.

kunal

Please try using actual English in your posts. This isn't a text messaging
forum.

--
Virgil



Back to top
Morten Alver
Guest





PostPosted: Wed Sep 14, 2005 4:26 pm    Post subject: Re: 2 simple guys Reply with quote

Kunnie wrote:
Quote:
hey guys,
thanx for posting,but ut programmes were 2 simple,we've already done
those in school.as for asking the teacher,well he is lazybum and an
abusive variety of humans and thus we have turned to u.ur fibonacci is
to simple.in the loop u just put(int i=3;i<=n;i++).i has been
designated three as the first 2 numbers have already been printed
outside the loop.ur porridge one requires the use of if,else if
statements...............too simple guys.

we were looking for something tougher,pls try to post such things which
are challenging.

Ah, and I was wondering who these two simple guys were... :)


--
Morten

Back to top
Roedy Green
Guest





PostPosted: Wed Sep 14, 2005 7:07 pm    Post subject: Re: 2 simple guys Reply with quote

On 14 Sep 2005 06:29:12 -0700, "Kunnie" <mankindlover89 (AT) gmail (DOT) com>
wrote or quoted :

Quote:
we were looking for something tougher,pls try to post such things which
are challenging.

see http://mindprod.com/projects/projects.html

See also http://mindprod.com/jgloss/newsroups.html

Particularly the part about the gift horse.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Back to top
Oliver Wong
Guest





PostPosted: Wed Sep 14, 2005 8:09 pm    Post subject: Re: 2 simple guys Reply with quote


"Roedy Green" <look-on (AT) mindprod (DOT) com.invalid> wrote

Quote:
See also http://mindprod.com/jgloss/newsroups.html

You probably meant http://mindprod.com/jgloss/newsgroups.html (note the g)

Quote:
Particularly the part about the gift horse.

Nicely written. Incidentally, I think there's a typo in paragraph under
the heading "Entitlement": "more likely to get you put in killfiles THAT
[emphasis mine] to spur an answer."

- Oliver



Back to top
corporal commander
Guest





PostPosted: Sat Sep 17, 2005 4:13 pm    Post subject: Re: 2 simple guys Reply with quote

hey oliver,
sorry for making tat new topic,
the most complicated program that i have written is an ecryption
system.i wil upload it on the site so that u can rectify some errors in
the decodeing and also know my level.

the knowledge we get in our class is pretty limited.we do not have any
usage of complex funcs.......,thus i cannot do that evaluation
thingy,but i'll try to do it in loops.

Back to top
Oliver Wong
Guest





PostPosted: Mon Sep 19, 2005 4:25 pm    Post subject: Re: 2 simple guys Reply with quote


"corporal commander" <mankindlover89 (AT) gmail (DOT) com> wrote

Quote:
hey oliver,
sorry for making tat new topic,
the most complicated program that i have written is an ecryption
system.i wil upload it on the site so that u can rectify some errors in
the decodeing and also know my level.

Okay, post the URL when it's ready.

Quote:
the knowledge we get in our class is pretty limited.we do not have any
usage of complex funcs.......,thus i cannot do that evaluation
thingy,but i'll try to do it in loops.

For the expression evaluator, I don't think you need to use anything
more complicated than string manipulation functions (e.g. see the
StringTokenizer class), and the Integer.parseInt() method. If you've never
done parsing before though, it might take a while for you to figure out what
the algorithm is (hint: you'll want to use recursion).

Alternatively, you might want to start learning how to write GUI
applications using Swing. That'll open up a whole new class of programs for
you to explore. You can find a tutorial for that at
http://java.sun.com/docs/books/tutorial/uiswing/index.html From there you
could write simple text editors, or calculators or other small applications
like that.

One caveat is that you'll probably need a good grasp of object oriented
programming to really "get" the Swing API. Unfortunately I don't know of any
free resources that can guide you down this path.

- Oliver



Back to top
Michael N. Christoff
Guest





PostPosted: Fri Sep 23, 2005 5:42 am    Post subject: Re: 2 simple guys Reply with quote

How old are you? 13? 14? Your grammar implies that you're at least as much
of a 'lazy bum' as your teacher. Go back to school and focus on the
language you write in... (Hint: Its called English, or as you'd probably
write: "nglsh")



"Kunnie" <mankindlover89 (AT) gmail (DOT) com> wrote

Quote:
hey guys,
thanx for posting,but ut programmes were 2 simple,we've already done
those in school.as for asking the teacher,well he is lazybum and an
abusive variety of humans and thus we have turned to u.ur fibonacci is
to simple.in the loop u just put(int i=3;i<=n;i++).i has been
designated three as the first 2 numbers have already been printed
outside the loop.ur porridge one requires the use of if,else if
statements...............too simple guys.

we were looking for something tougher,pls try to post such things which
are challenging.

kunal




Back to top
Joerg Simon
Guest





PostPosted: Fri Sep 23, 2005 9:47 am    Post subject: Re: 2 simple guys Reply with quote

Oliver Wong schrieb:
Quote:
"corporal commander" <mankindlover89 (AT) gmail (DOT) com> wrote in message
news:1126973597.909692.72260 (AT) g44g2000cwa (DOT) googlegroups.com...

hey oliver,
sorry for making tat new topic,
the most complicated program that i have written is an ecryption
system.i wil upload it on the site so that u can rectify some errors in
the decodeing and also know my level.


Okay, post the URL when it's ready.


the knowledge we get in our class is pretty limited.we do not have any
usage of complex funcs.......,thus i cannot do that evaluation
thingy,but i'll try to do it in loops.


For the expression evaluator, I don't think you need to use anything
more complicated than string manipulation functions (e.g. see the
StringTokenizer class), and the Integer.parseInt() method. If you've never
done parsing before though, it might take a while for you to figure out what
the algorithm is (hint: you'll want to use recursion).

Yust a little node: you find plenty of sources for that in compiler
construction material (or the ols cp bible: the dragon book Wink ).

Quote:
Alternatively, you might want to start learning how to write GUI
applications using Swing. That'll open up a whole new class of programs for
you to explore. You can find a tutorial for that at
http://java.sun.com/docs/books/tutorial/uiswing/index.html From there you
could write simple text editors, or calculators or other small applications
like that.

One caveat is that you'll probably need a good grasp of object oriented
programming to really "get" the Swing API. Unfortunately I don't know of any
free resources that can guide you down this path.

- Oliver



Back to top
Igor Planinc
Guest





PostPosted: Fri Sep 23, 2005 12:46 pm    Post subject: Re: 2 simple guys Reply with quote

Kunnie wrote:

Quote:
we were looking for something tougher,pls try to post such things which
are challenging.

I. Implement a data structure for graphs. Specifics:

1. Graph: simple (no multiple edges nor loops) and undirected.
2. Should have _low_mem_consumption_.
3. Should have _very_fast_:
getting edge count,
getting vertex count,
getting existent edges,
getting nonexistent "edges",
adding/removing vertices,
adding/removing edges
generating contractions
cloning

In one word: graph data structure suitable for computing chromatic polynomials.
So, while you're at it, you can also...

II. Implement a data structure for polynomials (BigInteger coefficients) with
_fast_ addition (coefficient as well as polynomial), multiplication and expanding.

If you decide to implement any of that, I'd be interested in your source code.

Back to top
Joerg Simon
Guest





PostPosted: Fri Sep 23, 2005 12:58 pm    Post subject: Re: 2 simple guys Reply with quote

Igor Planinc schrieb:
Quote:
Kunnie wrote:

we were looking for something tougher,pls try to post such things which
are challenging.


I. Implement a data structure for graphs. Specifics:
[snip]
In one word: graph data structure suitable for computing chromatic
polynomials. So, while you're at it, you can also...

II. Implement a data structure for polynomials (BigInteger coefficients)
with _fast_ addition (coefficient as well as polynomial), multiplication
and expanding.

If you decide to implement any of that, I'd be interested in your source
code.

Maybe a balanced binary tree as introduction? Is still not that easy,
especially if you support removing, but seems a little bit less
challanging.....

note: if you really implement Igor's stuff, pleases provide me a link too :)

Jörg

Back to top
Oliver Wong
Guest





PostPosted: Fri Sep 23, 2005 2:48 pm    Post subject: Re: 2 simple guys Reply with quote


"Igor Planinc" <igoplan (AT) hotmail (DOT) com> wrote

Quote:
Kunnie wrote:

we were looking for something tougher,pls try to post such things which
are challenging.

I. Implement a data structure for graphs. Specifics:

1. Graph: simple (no multiple edges nor loops) and undirected.
2. Should have _low_mem_consumption_.
3. Should have _very_fast_:
getting edge count,
getting vertex count,
getting existent edges,
getting nonexistent "edges",

What does it mean to get nonexistent edges? Are you supposed to return a
Collection<Edge> of all the possible edges in a complete graph, or the
maximal number of edges that could be added while keeping the graph simple
(no loops), or what?

Quote:
adding/removing vertices,
adding/removing edges
generating contractions
cloning

In one word: graph data structure suitable for computing chromatic
polynomials. So, while you're at it, you can also...

II. Implement a data structure for polynomials (BigInteger coefficients)
with _fast_ addition (coefficient as well as polynomial), multiplication
and expanding.

If you decide to implement any of that, I'd be interested in your source
code.



Back to top
Igor Planinc
Guest





PostPosted: Sun Sep 25, 2005 9:24 pm    Post subject: Re: 2 simple guys Reply with quote

Oliver Wong wrote:

Quote:
What does it mean to get nonexistent edges? Are you supposed to return a
Collection<Edge> of all the possible edges in a complete graph, or the
maximal number of edges that could be added while keeping the graph simple
(no loops), or what?

The formula:

P_{G}(x) = P_{G-e}(x) - P_{G/e}(x).

Or... looking at it bass ackward Wink :

P_{G-e}(x) = P_{G}(x) + P_{G/e}(x)

As you can see, the second version calls for an addition of an edge (G-e -> G)
which ... isn't there, yet. ;-)

Accordingly one must decide which (previously nonexistent) edge to add.
Returning to your question, that can mean a lot of things. From a trivial return
of a pair of vertices (i.e. an edge) which aren't connected, to a complex
quasy-iterator-like behaviour returning such unconnected pairs that a binary
tree according to the formula has a minimum number of nodes (== graphs), thus
making calculation faster.

And something similar for the existing edges: return edges leading to the
"smallest" tree, and thus speed.

Remember, calculating of chromatic polynomials is a very tough problem.
NP-complete in fact. Setting aside all the special cases (families) of graphs
with known chromatic polynomials, the hardness reduces to clever selection of
those edges.

Now, if the edges aren't chosen in a smart way, one has to apply brute force:
add (or remove) a lot of edges and make a lot of contractions. If this is done
fast, it can reduce calculation time considerably.


To wrap things up, I think our "2 simple guys" will be occupied for quite some
time. In fact, I don't think we'll ever hear from them again. ;-)

Back to top
Oliver Wong
Guest





PostPosted: Mon Sep 26, 2005 3:03 pm    Post subject: Re: 2 simple guys Reply with quote


"Igor Planinc" <igoplan (AT) hotmail (DOT) com> wrote

Quote:
Oliver Wong wrote:

What does it mean to get nonexistent edges? Are you supposed to return a
Collection<Edge> of all the possible edges in a complete graph, or the
maximal number of edges that could be added while keeping the graph
simple (no loops), or what?

The formula:

P_{G}(x) = P_{G-e}(x) - P_{G/e}(x).

Or... looking at it bass ackward Wink :

P_{G-e}(x) = P_{G}(x) + P_{G/e}(x)

As you can see, the second version calls for an addition of an edge
(G-e -> G) which ... isn't there, yet. Wink

<sarcasm>Ah yes, it's all so clear now...</sarcasm>

I looked up chromatic polynomials on Wikipedia, but the explanation
there was a bit too terse for me to be able to grasp the concepts. I guess
it's sufficient for me to know that generating the polynomials is
NP-Complete.

The problem with asking non-computer-science-graduates to implement
algorithms for NP-Complete problems is that they can actually do it
(remember, these problems are only intractable, not uncomputable) And when
we say "But... it doesn't run in polynomial time/space!" they won't know
what polynomial time/space means, and they'll say it runs "fast enough" on
their machine.

- Oliver



Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java: Support and criticism All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.