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. python写文件时遇到UnicodeEncodeError: 'gbk' codec can't encode character的解决方式

    在window平台,文件的默认编码是gbk, 此时如果写入的字符串的编码是utf-8就会引发这种错误,打开文件的编码必须与字符串的编码一致 with open('content.txt','w',en ...

  2. svn:E170001:Authorization failed解决

    eclipse添加svn资源库:打开eclipse→Window→SVN资源库→空白处右键新建资源库位置→填写正确的URL→finish 错误信息: 原因一:用户名或密码错误 因svn登录验证的账号信 ...

  3. Vue企业级优雅实战05-框架开发01-登录界面

    预览本文的实现效果: # gitee git clone git@gitee.com:cloudyly/dscloudy-admin-single.git # github git clone git ...

  4. Pytest学习(二) - 断言的使用

    一.前言 学习pytest总会习惯性的和unittest对比使用,自然就断言pytest和unittest也是有些区别的. 二.断言对比 unittest 断言 assertEqual(a, b) # ...

  5. JS之关于函数

    Javascript的函数也是一个对象 function test() { ... } var test = function(){ ... } 函数内部一旦执行return,则函数执行完毕,如果没有 ...

  6. 联赛模拟测试24 B. 答题 折半枚举

    题目描述 分析 暴力的思想是把 \(2^n\) 种得分枚举出来,每一种得分的概率都是相同的,然后从小到大累加,直到大于等于所给的概率 把问题转化一下,就变成了在 \(2^n\) 种元素中求 \(k\) ...

  7. JS-根据身份证获取 出生日期和性别

    一.根据身份证获取出生日期和性别/** * 根据身份证获取出生日期(yyyy-MM-dd) * @param psidno * @returns {birthday:yyyy-MM-dd} * @co ...

  8. Java 复制到剪贴板

    public void copy(String str) { StringSelection stsel = new StringSelection(str); Toolkit.getDefaultT ...

  9. 【Javac编译异常】javac编译提示jdk中的包找不到的问题error: package jdk.internal.org.objectweb.asm does not exist 和 error: cannot find symbol

    一.复现步骤 1)编写待编译的java类 package f_asm_and_javassist; import jdk.internal.org.objectweb.asm.*; import ja ...

  10. Linux 网络编程的5种IO模型:信号驱动IO模型

    Linux 网络编程的5种IO模型:信号驱动IO模型 背景 上一讲 Linux 网络编程的5种IO模型:多路复用(select/poll/epoll) 我们讲解了多路复用等方面的知识,以及有关例程. ...