What counts as plagiarism? Plagiarism is,


  the "wrongful appropriation" and "stealing and
  publication" of another author's "language, thoughts, ideas, or
  expressions" and the representation of them as one's own original
  work.


as defined here,

and 


  According to U.S. law, the answer is yes. The expression of original
  ideas is considered intellectual property and is protected by
  copyright laws, just like original inventions.


as mentioned here.

However, what is the definition for expressing ideas? What is the limit for person B(ob) to be have plagiarized person A(lice)'s work?

Clearly, Alice has to prove that she expressed it before Bob. But what counts as a proof?
Please consider the following scenarios:


Alice asks a question in StackExchange (or any other site), defining her problem in detail, and Bob somehow figures out what the answer is. Instead of writing the answer, he publishes the paper himself.
Alice writes a technical report (not a full paper) and publishes it in her website. Bob downloads the technical report, shares it with his teammates and soon, they publish a paper based on Alice's technical report.
Similar to (2), Alice has published a technical report in her website, defining a problem, with a first-attempt solution, which clearly can be improved. Bob, on the other hand, sees the technical report and finds a better solution. Then, publishes it. Now, Alice cannot publish her results because Bob's solution is better.
Alice spoke about the problem (or experiment) she is working on in an informal public place (e.g. cafeteria).  Bob heard it, and found a way to solve the problem (or carried out the experiment she intended to). He published it in a journal.


Important note: I am pretty sure, in all cases Bob has plagiarized Alice's work. What I am asking is, can Alice actually prove that her work is plagiarized? Especially, in case 4, can she show witnesses about her talking about the project first?

What if Bob was working on the same problem longer than Alice? Does just expressing the idea make it Alice's?
Probably the question cannot really be about plagiarism, literally, because most traditional senses of "plagiarism" refer to specific choices of language, rather than "ideas".

In the first three cases, Bob's behavior would be completely within the range of standard operating procedure. Public information is public. Yet, also, at the same time, many people would consider such behavior rude and mercenary. That's not the same as illegal or unethical, whether or not it is immoral.

(The fourth case is harder for me to simulate in my head, and I have no comment on it.)

Yes, one could imagine that mentioning a problem or idea publicly gives one some sort of right to it. However, in practice, this cannot possibly work, because it is extremely difficult to gauge what more is required to make an idea into something substantial. The only viable default is to imagine that whatever one says publicly is then truly available for all. One cannot control it, or guarantee "getting credit". Yes, the most virtuous people will give credit to the origins of their ideas, etc. ("Duh!")

If the real question is how to stake a claim on ideas in a fashion that prohibits others from doing anything with them ... as opposed to taking the idea, doing something, and giving credit for origins... I have no suggestion except keeping secrets.

EDIT: and, no, merely expressing an idea does not create "possession"... Not at all. But, among decent people, credit would be given. Can't rely on this, etc.