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. spring boot: filter/interceptor/aop在获取request/method参数上的区别(spring boot 2.3.1)

    一,filter/interceptor/aop在获取参数上有什么区别? 1,filter可以修改HttpServletRequest的参数(doFilter方法的功能), interceptor/a ...

  2. Python之包的相关

    包的产生: 由于模块不断更新,越写越大,仅用单个py文件会使模块逻辑不够清晰,所以需要将模块的不同功能放入不同的py文件,然后将所有py文件放在一个目录内,这个目录就是包 包就是一个包含用__init ...

  3. Spring Shiro配置第三方SSO客户端登录

    经过实践的Shiro配置,利用 sSOInterceptor 进行sso登录拦截 配置 @Configuration public class ShiroConfiguration extends B ...

  4. Luogu P4208 [JSOI2008]最小生成树计数

    题意 给定一个 \(n\) 个点 \(m\) 条边的图,求最小生成树的个数. \(\texttt{Data Range:}1\leq n\leq 100,1\leq m\leq 10^4\) 题解 一 ...

  5. Luogu P4172 [WC2006]水管局长

    题意 给定一个 \(n\) 个点 \(m\) 条边的图和 \(q\) 次操作,每次操作分为以下两种: 1 u v:查询 \(u\) 到 \(v\) 的一条路径使得边权最大的边的权值最小. 2 u v: ...

  6. 如何学习C语言

    总结学习 C 语言的几个步骤,其他编程语言基本类似. 看书 学习一门编程语言少不了先学习基本语法. C语言的语法也就是变量,数组.指针.表达式.逻辑操作.函数,宏定义等等.学习这些先买一本入门级书籍, ...

  7. Linux 系统编程 学习:09-线程:线程的创建、回收与取消

    Linux 系统编程 学习:09-线程:线程的创建.回收与取消 背景 我们在此之前完成了 有关进程的学习.从这一讲开始我们学习线程. 完全的开发可以参考:<多线程编程指南> 在Linux ...

  8. 基于gin的golang web开发:模型验证

    Gin除了模型绑定还提供了模型验证功能.你可以给字段指定特定的规则标签,如果一个字段用binding:"required"标签修饰,在绑定时该字段的值为空,那么将返回一个错误.开发 ...

  9. [LuoguP2161[ [SHOI2009]会场预约 (splay)

    题面 传送门:https://www.luogu.org/problemnew/show/P2161 Solution splay 的确有线段树/树状数组的做法,但我做的时候脑残没想到 我们可以考虑写 ...

  10. PASS模型-第一周个人总结

    目录 PASS模型-第一周个人报告 1.个人任务 2.个人工作内容 2.1 登陆界面 2.2 信息采集 2.3 视觉搜索 3.个人小结 3.1 收获 3.2 优化 PASS模型-第一周个人报告 博客班 ...