Linear basis is a relatively easy to learn but may not be useful algorithm.

Below are two blogs that I think are better.

Linear-based talk

Detailed Explanation of Linear Base

The complexity of the linear basis is very good, if it is inserted normally, it is \(O(n*64)\), and millions of data are run randomly.

The most important thing about a linear basis is its several excellent properties, which are generally investigated in the topic of a linear basis.

  1. The value range of the XOR of the numbers in the original number set is equal to the value range of the elements in the linear basis.

    This is very important, indicating that the linear basis can replace the original number set for the next step, and it is also a guarantee for the correctness of the linear basis.

  2. Linear basis is simplified, not redundant.

    This means that the linear basis is the smallest set of numbers that satisfies the conditions, and there are not too many. Specifically, there are several small properties:

    There is no non-empty subset whose XOR sum is zero in the linear basis.

    Each scheme of the selected element in the linear basis corresponds to an XOR value, and there is no situation where multiple selection schemes correspond to the same XOR value

The above are the two major properties of linear basis, which are the basis of linear basis.

Regarding the question, the main difficulty is that it is difficult for you to think that this is a linear basis question. Generally speaking, it is not difficult after thinking it.

Basic use of supplementary linear basis:

  1. Query the maximum value of the exclusive OR of n numbers.
  2. Query the minimum value of the exclusive OR of n numbers.
  3. Query whether a certain number can be XORed.
  4. Query the k small value of the exclusive OR of n numbers.

Linear basis的更多相关文章

  1. 线性基(Linear Basis)学习笔记

    前言 我看网络上没有什么非常系统的教学,可能是我太菜了吧,现在才学,做个记录给自己看. 简略介绍 一个数集能两两异或,能表出许多新的数. 线性基是一个集合,能够在记录最少的数的基础上,表示出一个等价的 ...

  2. PRML读书笔记——3 Linear Models for Regression

    Linear Basis Function Models 线性模型的一个关键属性是它是参数的一个线性函数,形式如下: w是参数,x可以是原始的数据,也可以是关于原始数据的一个函数值,这个函数就叫bas ...

  3. 样条曲线的Fortran程序

    subroutine basis_function_b_val ( tdata, tval, yval ) ! !******************************************* ...

  4. PRML 第三章 - 线性回归

    这段时间组里在有计划地学习书籍PRML (Pattern Recognition and Machine Learning),前两天自己做了一个里面第三章linear regression的分享,这里 ...

  5. CF938G Shortest Path Queries

    首先只有询问的话就是个WC的题,线性基+生成树搞一搞就行. 进一步,考虑如果修改操作只有加边怎么做. 好像也没有什么变化,只不过需要在线地往线性基里插入东西而已. 删边呢? 注意到线性基这个玩意是不支 ...

  6. Tree - Decision Tree with sklearn source code

    After talking about Information theory, now let's come to one of its application - Decision Tree! No ...

  7. PRML读书笔记——线性回归模型(上)

    本章开始学习第一个有监督学习模型--线性回归模型."线性"在这里的含义仅限定了模型必须是参数的线性函数.而正如我们接下来要看到的,线性回归模型可以是输入变量\(x\)的非线性函数. ...

  8. Luogu 3292 [SCOI2016]幸运数字

    BZOJ 4568. 感觉很板. 前置技能:线性基.      放一篇感觉讲的比较丰富的博客: 戳这里. 首先要求在一个序列中任意选点使得异或和最大,当然是想到线性基了. 把问题转换到树上,如果每次询 ...

  9. PRML Chapter3

    曲线拟合的几种方法 最大似然估计MLE,最大后验概率MAP:MLE和MAP MLE 给定一堆数据,假如我们知道它是从某一种分布中随机取出来的,可是我们并不知道这个分布具体的参,即"模型已定, ...

随机推荐

  1. 为什么大部分的程序员学编程,都会选择从C语言开始?

    软件行业经过几十年的发展,编程语言的种类已经越来越多了,而且很多新的编程语言已经在这个领域从开始的默默无闻到如今风风火火,整个编程语言朝着集成化方向发展,这样会导致很多的初学者选择上不像以前那么单一了 ...

  2. 【组合计数】visit

    题目大意 从 \((0,0)\) 开始,每次只可走上下左右一个单位长度,可走重复路,求第 \(T\) 步正好走到 \((n,m)\) 的方案数. 答案要求对 \(MOD\) 取模,\(MOD\) 保证 ...

  3. 小tip:CSS计数器+伪类实现数值动态计算与呈现【转】

    [原文]http://www.zhangxinxu.com/wordpress/2014/12/css-counters-pseudo-class-checked-numbers/ 一.CSS计数器为 ...

  4. 通过SQL自动添加流水号

    通过SQL自动添加流水号 项目中往往有一些单据流水号或者流程流水号是希望通过新增一条记录后自动产生一个编号的,比如新增一条流程就自动根据当前日期自动添加该流程的流程流水号,下面介绍两种不同类型流水号通 ...

  5. Business Partner - 供应商与客户的集成 - S/4HANA(2)

    配置 BP配置 激活BP的PPO请求 Cross-Application Components->Master Data Synchronization->Master Data Sync ...

  6. 【C++】 C++异常捕捉和处理

    在阅读别人开发的项目中,也许你会经常看到了多处使用异常的代码,也许你也很少遇见使用异常处理的代码.那在什么时候该使用异常,又在什么时候不该使用异常呢?在学习完异常基本概念和语法之后,后面会有讲解. ( ...

  7. CF1430 D. String Deletion(div 2)

    题目链接:http://codeforces.com/contest/1430/problem/D 题意:有一个长度为n(n<=2*10^5)的01字符串,每轮操作有两步: 第一步是删去字符串中 ...

  8. Stream(二)

    public class Test { /* * Stream接口: * 实现类 * IntStream * DoubleStream * LongStream * * 一.创建Stream * 1. ...

  9. GridView使用SimpleAdapter

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app=&q ...

  10. Redis---06主从复制(薪火相传)

    一.什么是薪火相传模式 上一个slave(从机)是下一个slave(从机)的Master(主机) 二.为什么要这样 优点:从机同样可以接收其他从机的连接和同步请求,那么该从机作为了链条中下一个的主机, ...