|
[Date Index]
[Thread Index]
[Author Index]
Find common elements in a list of sublists
- To: mathgroup at smc.vnet.net
- Subject: [mg125792] Find common elements in a list of sublists
- From: Cisco Lane <travlorf at yahoo.com>
- Date: Tue, 3 Apr 2012 04:44:04 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Suppose I have a list of sublists:
d={{1, 19}, {1, 23}, {1, 5, 25}, {1, 17}, {1, 11}, {1, 5}}
How do I find the elements common to all the sublists?
I can do it using intersection:
Intersection[dx[[1]], dx[[2]], dx[[3]], dx[[4]], dx[[5]], dx[[6]]]
which yields, correctly, {1}, but what if the number of sublists in d is variable?
Prev by Date:
Re: typesetting derivative at a value
Next by Date:
how to make formatted output with Grid and Print?
Previous by thread:
Re: Integers that are the sum of 2 nonzero squares in exactly 2 ways
Next by thread:
Re: Find common elements in a list of sublists
|