can the president and the vice president come from the same state

No. The Constitution doesn't allow the electors to choose both a vice president and a president from the same state as the elector. This provision is easily sidestepped when one of the candidates changes his legal residence to another state -- as Vice President Cheney did.

http://library.thinkquest.org/12405/14start.htm

http://www.thegreenpapers.com/Hx/ConProv.html

Ooops -- I posted the wrong link. The library.thinkquest link does not pertain to this question.

Sorry.

The Twelfth Amendment does not preclude the election of a President and Vice President from the same state. Nevertheless, running mates conventionally come from different states to prevent situations wherein electors of the state in question are forced to vote for a candidate from a different party merely on the grounds of residency. The issue arose during the 2000 presidential election contested by George W. Bush (alongside running-mate Cheney) and Al Gore (alongside Joe Lieberman). It was alleged that Cheney and Bush were both inhabitants of Texas, and that the Texas electors could therefore not cast their ballots for both. Bush's residency was unquestioned, as he was governor of Texas at the time. Cheney had lived and was registered to vote in Texas, but a few months before the election changed his official residency to Wyoming, the state where he had grown up, and for which he had, many years earlier, served as the U.S. Representative. A lawsuit alleging that Cheney remained an inhabitant of Texas was brought, but it was dismissed by the U.S. District Court for the Northern District of Texas.

Source:
http://www.answers.com/topic/amendment-xii-to-the-u-s-constitution

According to the Constitution, the President and Vice President cannot come from the same state. This provision prevents electors from choosing both a President and a Vice President from the same state. However, there is no explicit prohibition in the Twelfth Amendment, which governs the election of the President and Vice President, against candidates from the same state running together.

In practice, running mates (presidential and vice presidential candidates) tend to come from different states to avoid situations where electors from a particular state are forced to vote for candidates from different parties based solely on residency. This convention is followed to prevent any conflicts or legal challenges regarding the electors' votes.

One notable example of a potential conflict arose during the 2000 presidential election when George W. Bush and Cheney ran together as the Republican candidates. Both Bush and Cheney had ties to Texas, and it was alleged that the Texas electors could not cast their ballots for both of them. However, Cheney changed his official residency to Wyoming, where he had grown up and previously served as a U.S. Representative, a few months before the election. This change in residency resolved any potential conflict and allowed for the electors in Texas to vote for both Bush and Cheney.

In summary, while the Constitution does not explicitly prohibit candidates from the same state running together, running mates conventionally come from different states to avoid any issues related to the electors' votes and to ensure a smooth electoral process.