Questions & Answers about nǐ hé tā de xiǎngfǎ yíyàng.
的 marks possession or a modifying relationship. Literally, 她的想法 is her ideas.
In 你和她的想法一样 there are two ways to understand the structure:
As a shortcut for:
你的想法和她的想法一样
(Your ideas and her ideas are the same.)
Here, 的 is written only once (after 她) to avoid repetition, but it is understood for both.As:
你和她的 想法 一样
where 你和她的 = you and her (both) ‘s, and 想法 = idea(s)
So: The ideas of you two are the same.
In either case, 的 is needed to link 她 to 想法; Chinese allows you to share that 的 + noun with both people, so you don’t have to write 的 twice.
Yes, you can, and native speakers often do, especially in spoken Chinese.
你和她的想法一样
Subject = 你和她的想法 (your and her ideas)
Predicate = 一样 (are the same)你和她想法一样
Subject = 你和她 (you and she)
Predicate = 想法一样 ([your] ideas are the same)
The meaning in practice is the same. With 的, it feels a bit more explicit or careful; without 的, a bit more colloquial and compact. Both are natural.