7) Explain about the role of bitmap indexes to solve aggregation problems?
Bitmaps are very useful in start schema to join large databases to small
databases. Answer queries and bit arrays are used to perform logical
operations on the databases. Bit map indexes are very efficient in handling
Gender differentiation; also repetitive tasks are performed with much larger
efficiency.
8) Explain about Encoding technique used in bitmaps indexes?
Bitmaps commonly use one bitmap for every single distinct
OLAP - role of bitmap indexes to solve aggregation problems - March 08, 2009
at 22:00 PM by Rajmeet Ghai
Explain the role of bitmap indexes to solve aggregation problems.
Bitmap indexes are useful in connecting smaller databases to larger
databases. Bit map indexes can be very useful in performing repetitive
indexes. Multiple Bitmap indexes can be used to compute conditions on a
single table.
OLAP - role of bitmap indexes to solve aggregation problems - Jan 10, 2010
at 18:50 PM by Vidya Sagar
E
这是一本计算神经科学的优秀著作,全文拷贝这里(图和公式缺),有兴趣的同学可以
阅读
如需要,我可以分享PDF文件(--仅供个人学习,无商业用途)
From Computer to Brain
William W. Lytton
From Computer to Brain
Foundations of Computational Neuroscience
Springer
William W. Lytton, M.D.
Associate Professor, State University of New York, Downstato, Brooklyn, NY
Visiting Associate Professor, University of Wisconsin, Madison
Visiting Associate Professor, Polytechnic University, Brooklyn, NY
Staff Neurologist., Kings County Hospital, Brooklyn, NY
In From Computer to Brain: ... 阅读全帖
3.
举个例子,当学习bitmap index的时候,
a. 什么是bitmap index
b. 为什么要用bitmap index
c. bitmap index和b-tree index在应用上有什么区别?谁适合oltp,谁适合dss?
d. 为什么有这样的区别,bitmap index和b-tree index在结构上有什么区别?
e. b-tree index存储null值吗?bitmap呢?
f. 怎么证明b-tree or bitmap index是否存储null值?
3.
举个例子,当学习bitmap index的时候,
a. 什么是bitmap index
b. 为什么要用bitmap index
c. bitmap index和b-tree index在应用上有什么区别?谁适合oltp,谁适合dss?
d. 为什么有这样的区别,bitmap index和b-tree index在结构上有什么区别?
e. b-tree index存储null值吗?bitmap呢?
f. 怎么证明b-tree or bitmap index是否存储null值?
是不是我改java改的有问题
bitmap判断那句改成下面的是不是对的?
if (((1 << i) & bitmap) != 0) {
continue;
}
static void rearrange(ArrayList list) {
int bitmap = 0; // "O(1)" space for length < (1 << 32)
int k = list.size() / 2;
int n = list.size();
for (int i = 0; get_index(i) < k; ++i) {
int cur = get_index(i);
if (((1 << i) & bitmap) != 0) {
continue;
}
int next = cur * 2;
String tmp = list.get(cur);
while (true) {
if... 阅读全帖
怎么知道有没有超时呢?
贴一下俺的,抛砖引玉
int processOneCase(int n, int k, int a, int b, int c, int r)
{
// first k element,
// if a element < k, but it appear in later position,
//put all these emement but last element INT_MAX
vector vect(k, INT_MAX);
// whether a [0,k) show in the above vector
vector bitMap(k+1, 0);
// used for duplicate element for vect
map posMap;
for (int i = 0; i < k; i++)
{
int value = (i == 0) ? a : (b * (long long)vect[... 阅读全帖
You have millions of documents numbered 1,2,3,4,5 ......
You also have a mapping from a word to the list of documents that contains i
t
Find all the 'pair of words' that occur together in one and only document
Bitmap
It can be done in O(m+n)/O(Max(m,n)) time complexity and O(m*n bits).
We can calculate a BitMap for the given work by setting all the bits corresp
onding to each file(number). This BitMap will take O(m) space. The BitMap of
both words can be compared in o(1) time (any weird insane c
cool man! Thanks! I think you can definitely get an offer.
About the data structure for tetris game, my idea is to use a bitmap to
express each shape, and store 4 rotated shaped in circular double link
list, each time when rotate function is called, it either point to the
left and right elem, which is pre-computed bitmap.
The board is also a bitmap, say M*M, so as long as we have the position
of the shape on board, say the rightmost coordinates (x,y), and the size
of the shape bitmap N*N. For ea... 阅读全帖
my two cents:
1.先做个bit map.O(N) time. bitmap中放数在array中的位置.
bitmap(i) = position of i in Array.
2. bitmap中连续的数,按array中的位置,那bitmap的value排序. 最坏O(NlogN)
2b. 对排序的数找最长连续数列 (需要考虑重复数字). O(N)
好像重复的数字也可以.
A python version:
def num(maps, s): ######## transform string to 4-based number
digit = 0
for i in range(len(s)):
digit = 4*digit + maps[s[i]]
return digit
def findRepeat(s):
maps = {'A':0, 'C':1,'G':2,'T':3}
bitmap = [0]*pow(4,2)
for i in range(len(s) - 2+1):
bitmap[ num[maps, s[i:i+2] ] += 1
invmaps = {v:k for k,v in maps.items()} ####### reverse maps
for i in range(len(bitmap)):
if bitmap[i] > 1:
print (invmaps[i//4] + in... 阅读全帖
A python version:
def num(maps, s): ######## transform string to 4-based number
digit = 0
for i in range(len(s)):
digit = 4*digit + maps[s[i]]
return digit
def findRepeat(s):
maps = {'A':0, 'C':1,'G':2,'T':3}
bitmap = [0]*pow(4,2)
for i in range(len(s) - 2+1):
bitmap[ num[maps, s[i:i+2] ] += 1
invmaps = {v:k for k,v in maps.items()} ####### reverse maps
for i in range(len(bitmap)):
if bitmap[i] > 1:
print (invmaps[i//4] + in... 阅读全帖