Okay, so the scenario is:
- 7♥ 8♥ 9♥ T♥ and 3♠ on the table
- Alice has a 5♥
- Bob has a 4♥
Who wins? Both of them have a flush to 10, right?
Does the sum of the entire 5 cards count in this case?
First: as amigal said, Alice wins. I just want to say something about the naming convention of the hands.
Alice and Bob do not have a "flush to 10"; that would imply that the cards are consecutive and that would be a straight flush. Alice's and Bob's hand - out of context - would be called a "Ten-high flush". As amigal said, if the highest card of a flush is shared between two players, the second-highest card is compared and if they match too it goes all the way down to the fifth card. You could call Alice's hand - in this context - a "Ten-Nine-Eight-Seven-Five-High Flush" and Bob's hand a "Ten-Nine-Eight-Seven-Four-High Flush".
By the way: the only way that a flush leads to a split pot in Texas Hold'em is if all players play the whole flush from the community cards.
About your second question: it is generally not the sum of the cards that determines the winning hand but the highest card. So a flush with
Yes, the application of the five highest card rule means that Alice wins.
Her highest five cards are 10, 9, 8, 7, 5 of hearts (no straight flush).
Bob's is 10, 9, 8, 7, 4 of hearts. The "tailing" four loses to Alice's 5.
Counterexample: The board is K, 10, 9, 8, 7 of hearts.
Then Alice's and Bob's five highest cards are K, 10, 9, 8, 7. Alice's 5 is a "sixth" card, which doesn't count against Bob's 4, also a sixth card.
Second counter example: Board is 10, 9, 8, 7 of hearts, 3 of spades.
Alice has K of hearts, Bob has 6 of hearts.
Bob has a "straight flush" 10, 9, 8, 7, 6 of hearts, which beats Alice's K, 10, 9, 8, 7 king-high flush, even though a K is bigger than 6. If Alice had the J of hearts, she would also have a straight flush, J-high, which would beat Bob's straight flush, 10 high.
Alice wins because she has higher flush.
the rule is that if both player has the same highest card, the second higher card is checked. if the second highest card is the same for both players, the third highest card is checked and so on.
in your case, the 4 highest cards are the same for both players.