I have asked the same question in ELL stackexchange, but unfortunately haven't received enough answer/comment. The one answer I got is not satisfactory. So that's the reason I am asking it here again. Link to ELL post.
I have seen in some cases prepositions are omitted before some noun phrases. And it's explained that those phrases are actually an adverb phrases. But I know a simple thing. If the head of the phrase is a noun, it's a noun phrase. If the head of the phrase is an adverb it is an adverb phrase.
For example –
Look both ways before crossing the road. [both ways is a noun phrase, where the head is ways, but still there is no preposition.]
He approached me in a friendly way. [a friendly way is a noun phrase, where the head is way, but as expected unlike sentence #1 it's preceded by the preposition in. And I have never seen this phrase is used without a preposition. I believe dropping the preposition is wrong, according to the grammar.]
She made a pickle a different way from her mother. [a different way is a noun phrase, where the head is way, but strangely there is no preposition before it. But I have seen examples of a different way used both with prepositions and without prepositions. I think the preposition here is optional.]
Now from these example sentences I have tried to demonstrate my problem/confusing area. My question is –
1. When a noun phrase is used as an adverb phrase?
2. When before a noun phrase the placement of preposition is obligatory (like sentence #2)? And where it's optional (like sentence #3)? And where placing the preposition is wrong (like sentence #1)?